Changeset 6677acb in mainline for kernel/arch/riscv64/_link.ld.in


Ignore:
Timestamp:
2024-01-14T15:09:08Z (17 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
3b68542
Parents:
5907aa4
Message:

Emit .text/.data/.eh_frame sections in kernel ELF files

Gives tools like objdump an easier time interpreting contents of
the file, and allows kernel to find .eh_frame_hdr since the linker
emits a program header for it when it's present under the standard
name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/riscv64/_link.ld.in

    r5907aa4 r6677acb  
    1616        kernel_load_address = PA2KA(BOOT_OFFSET);
    1717
    18         .image (PA2KA(BOOT_OFFSET) + SIZEOF_HEADERS) : AT (BOOT_OFFSET + SIZEOF_HEADERS) {
     18        .text (PA2KA(BOOT_OFFSET) + SIZEOF_HEADERS) : AT (BOOT_OFFSET + SIZEOF_HEADERS) {
    1919                ktext_start = .;
    2020                KEEP(*(K_TEXT_START));
    2121                *(.text .text.*);
    2222                ktext_end = .;
     23        }
    2324
     25        /* stack unwinding data */
     26        .eh_frame_hdr : {
     27                eh_frame_hdr_start = .;
     28                *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*);
     29                eh_frame_hdr_end = .;
     30        }
     31
     32        .eh_frame : {
     33                eh_frame_start = .;
     34                KEEP(*(.eh_frame .eh_frame.*));
     35                eh_frame_end = .;
     36        }
     37
     38        .data : {
    2439                kdata_start = .;
    2540                *(.data .data.*);                       /* initialized data */
    2641                *(.rodata .rodata.*);
    27                 *(.eh_frame .eh_frame.*);       /* stack unwinding data */
    28                 *(.eh_frame_hdr .eh_frame_hdr.*);
    2942                *(.sdata .sdata.*);
    3043                *(.sbss .sbss.*);
Note: See TracChangeset for help on using the changeset viewer.