diff options
| author | Fabian Imhof <fabian.imhof@ost.ch> | 2025-05-04 11:26:29 +0000 |
|---|---|---|
| committer | Fabian Imhof <fabian.imhof@ost.ch> | 2025-05-04 11:26:29 +0000 |
| commit | f83727a0c8913d19415c2ad482c70ee7373f6f3f (patch) | |
| tree | 02f914bceb5d3dbae8bba0924b655710f02bf5fd | |
| parent | ccb0fcb78c0d22ebaeb9aa37f1941b0d44c98038 (diff) | |
| download | teachos-f83727a0c8913d19415c2ad482c70ee7373f6f3f.tar.xz teachos-f83727a0c8913d19415c2ad482c70ee7373f6f3f.zip | |
add user_text linker section and temporarily add elf_sections.txt
| -rw-r--r-- | arch/x86_64/scripts/kernel.ld | 4 | ||||
| -rw-r--r-- | elf_sections.txt | 57 |
2 files changed, 59 insertions, 2 deletions
diff --git a/arch/x86_64/scripts/kernel.ld b/arch/x86_64/scripts/kernel.ld index 806adb5..239d026 100644 --- a/arch/x86_64/scripts/kernel.ld +++ b/arch/x86_64/scripts/kernel.ld @@ -90,9 +90,9 @@ SECTIONS *(.text*) } - .interrupt_text ALIGN(4K) : AT(ADDR (.interrupt_text)) + .user_text ALIGN(4K) : AT(ADDR (.user_text)) { - *(.interrupt_text) + *(.user_text) } .rodata ALIGN(4K) : AT (ADDR (.rodata)) diff --git a/elf_sections.txt b/elf_sections.txt new file mode 100644 index 0000000..b46a55f --- /dev/null +++ b/elf_sections.txt @@ -0,0 +1,57 @@ +There are 26 section headers, starting at offset 0x133308: + +Section Headers: + [Nr] Name Type Address Off Size ES Flg Lk Inf Al + [ 0] NULL 0000000000000000 000000 000000 00 0 0 0 + [ 1] .boot_rodata PROGBITS 0000000000100000 001000 0000f7 00 A 0 0 8 + [ 2] .boot_text PROGBITS 0000000000101000 002000 0001ae 00 AX 0 0 16 + [ 3] .boot_bss NOBITS 0000000000102000 0021ae 104000 00 WA 0 0 4096 + [ 4] .boot_data PROGBITS 0000000000206000 003000 000004 00 WA 0 0 1 + [ 5] .init PROGBITS 0000000000207000 004000 000010 00 AX 0 0 1 + [ 6] .fini PROGBITS 0000000000208000 005000 00000b 00 AX 0 0 1 + [ 7] .text PROGBITS 0000000000209000 006000 00ced0 00 AX 0 0 32 + [ 8] .user_text PROGBITS 0000000000216000 013000 00016c 00 AX 0 0 1 + [ 9] .rodata PROGBITS 0000000000217000 014000 000bc3 00 A 0 0 16 + [10] .ctors PROGBITS 0000000000218000 015000 000010 00 WA 0 0 8 + [11] .dtors PROGBITS 0000000000219000 016000 000010 00 WA 0 0 8 + [12] .bss NOBITS 000000000021a000 016010 0004a0 00 WA 0 0 32 + [13] .data PROGBITS 000000000021b000 018000 000010 00 WA 0 0 8 + [14] .debug_line PROGBITS 0000000000000000 018010 00e784 00 0 0 1 + [15] .debug_line_str PROGBITS 0000000000000000 026794 00256f 01 MS 0 0 1 + [16] .debug_info PROGBITS 0000000000000000 028d03 063564 00 0 0 1 + [17] .debug_abbrev PROGBITS 0000000000000000 08c267 00f2ae 00 0 0 1 + [18] .debug_aranges PROGBITS 0000000000000000 09b520 0031b0 00 0 0 16 + [19] .debug_str PROGBITS 0000000000000000 09e6d0 0441b3 01 MS 0 0 1 + [20] .debug_rnglists PROGBITS 0000000000000000 0e2883 001f06 00 0 0 1 + [21] .debug_macro PROGBITS 0000000000000000 0e4789 03471b 00 0 0 1 + [22] .debug_loclists PROGBITS 0000000000000000 118ea4 00030f 00 0 0 1 + [23] .symtab SYMTAB 0000000000000000 1191b8 005448 18 24 816 8 + [24] .strtab STRTAB 0000000000000000 11e600 014c03 00 0 0 1 + [25] .shstrtab STRTAB 0000000000000000 133203 000103 00 0 0 1 +Key to Flags: + W (write), A (alloc), X (execute), M (merge), S (strings), I (info), + L (link order), O (extra OS processing required), G (group), T (TLS), + C (compressed), x (unknown), o (OS specific), E (exclude), + D (mbind), l (large), p (processor specific) + +Elf file type is EXEC (Executable file) +Entry point 0x101061 +There are 6 program headers, starting at offset 64 + +Program Headers: + Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align + LOAD 0x001000 0x0000000000100000 0x0000000000100000 0x0000f7 0x0000f7 R 0x1000 + LOAD 0x002000 0x0000000000101000 0x0000000000101000 0x0001ae 0x105000 R E 0x1000 + LOAD 0x003000 0x0000000000206000 0x0000000000206000 0x000004 0x000004 RW 0x1000 + LOAD 0x004000 0x0000000000207000 0x0000000000207000 0x00f16c 0x00f16c R E 0x1000 + LOAD 0x015000 0x0000000000218000 0x0000000000218000 0x003010 0x003010 RW 0x1000 + LOAD 0x014000 0x0000000000217000 0x0000000000217000 0x000bc3 0x000bc3 R 0x1000 + + Section to Segment mapping: + Segment Sections... + 00 .boot_rodata + 01 .boot_text .boot_bss + 02 .boot_data + 03 .init .fini .text .user_text + 04 .ctors .dtors .bss .data + 05 .rodata |
