Changeset da13982 in mainline for kernel/arch/ia32/_link.ld.in


Ignore:
Timestamp:
2023-10-26T15:20:07Z (7 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, topic/msim-upgrade, topic/simplify-dev-export
Children:
2fbb42f
Parents:
d28bdbe
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-26 14:42:03)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-26 15:20:07)
Message:

Read symbol table from ELF sections

Instead of the currently broken data generated using genmap.py,
read the ELF symbol table for stack traces and symbol names.
In addition to that, prepare ground for accessing DWARF debug
sections.

Because neither .symtab, nor .debug_* sections are
normally part of the program image, these have to be provided
externally. Instead of the previous way of relinking kernel
to bake in the symbol data, we now only link kernel once
and the extra debug data is loaded as part of the initrd image.

File:
1 edited

Legend:

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

    rd28bdbe rda13982  
    2929                kdata_start = .;
    3030                *(.data);               /* initialized data */
    31                 *(.rodata .rodata.*);   /* string literals */
     31                *(.rodata .rodata.*);
     32                *(.eh_frame .eh_frame.*);       /* stack unwinding data */
     33                *(.eh_frame_hdr .eh_frame_hdr.*);
    3234                *(COMMON);              /* global variables */
    3335
    3436                /* bss can't be omitted from the ELF image. */
    3537                *(.bss);                /* uninitialized static variables */
    36 
    37                 . = ALIGN(8);
    38                 symbol_table = .;
    39                 *(symtab.*);            /* Symbol table, must be LAST symbol! */
    4038                kdata_end = .;
    4139        }
    4240
    43 #ifdef CONFIG_LINE_DEBUG
    4441        .comment 0 : { *(.comment); }
    4542        .debug_abbrev 0 : { *(.debug_abbrev); }
     43        .debug_abbrev.dwo 0 : { *(      .debug_abbrev.dwo); }
     44        .debug_addr 0 : { *(.debug_addr); }
    4645        .debug_aranges 0 : { *(.debug_aranges); }
     46        .debug_cu_index 0 : { *(.debug_cu_index); }
     47        .debug_frame 0 : { *(.debug_frame); }
     48        .debug_frame_hdr 0 : { *(.debug_frame_hdr); }
    4749        .debug_info 0 : { *(.debug_info); }
     50        .debug_info.dwo 0 : { *(.debug_info.dwo); }
    4851        .debug_line 0 : { *(.debug_line); }
     52        .debug_line.dwo 0 : { *(.debug_line.dwo); }
     53        .debug_line_str 0 : { *(.debug_line_str); }
    4954        .debug_loc 0 : { *(.debug_loc); }
     55        .debug_loclists 0 : { *(.debug_loclists); }
     56        .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); }
     57        .debug_macinfo 0 : { *(.debug_macinfo); }
     58        .debug_macro 0 : { *(.debug_macro); }
     59        .debug_macro.dwo 0 : { *(.debug_macro.dwo); }
     60        .debug_names 0 : { *(.debug_names); }
    5061        .debug_pubnames 0 : { *(.debug_pubnames); }
    5162        .debug_pubtypes 0 : { *(.debug_pubtypes); }
    5263        .debug_ranges 0 : { *(.debug_ranges); }
     64        .debug_rnglists 0 : { *(.debug_rnglists); }
    5365        .debug_str 0 : { *(.debug_str); }
    54 #endif
     66        .debug_str.dwo 0 : { *(.debug_str.dwo); }
     67        .debug_str_offsets 0 : { *(.debug_str_offsets); }
     68        .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); }
     69        .debug_tu_index 0 : { *(.debug_tu_index); }
     70        .debug_types 0 : { *(.debug_types); }
    5571
    5672        /DISCARD/ : {
Note: See TracChangeset for help on using the changeset viewer.