Changeset da13982 in mainline for kernel/arch/ppc32/_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/ppc32/_link.ld.in

    rd28bdbe rda13982  
    3434                *(K_DATA_START);
    3535                *(.rodata .rodata.*);
     36                *(.eh_frame .eh_frame.*);       /* stack unwinding data */
     37                *(.eh_frame_hdr .eh_frame_hdr.*);
    3638                *(.data);       /* initialized data */
    3739                *(.sdata);
     
    4042                *(.bss);        /* uninitialized static variables */
    4143                *(COMMON);      /* global variables */
    42 
    43                 . = ALIGN(8);
    44                 symbol_table = .;
    45                 *(symtab.*);    /* Symbol table, must be LAST symbol!*/
    46 
    4744                kdata_end = .;
    4845        }
     46
     47        .comment 0 : { *(.comment); }
     48        .debug_abbrev 0 : { *(.debug_abbrev); }
     49        .debug_abbrev.dwo 0 : { *(      .debug_abbrev.dwo); }
     50        .debug_addr 0 : { *(.debug_addr); }
     51        .debug_aranges 0 : { *(.debug_aranges); }
     52        .debug_cu_index 0 : { *(.debug_cu_index); }
     53        .debug_frame 0 : { *(.debug_frame); }
     54        .debug_frame_hdr 0 : { *(.debug_frame_hdr); }
     55        .debug_info 0 : { *(.debug_info); }
     56        .debug_info.dwo 0 : { *(.debug_info.dwo); }
     57        .debug_line 0 : { *(.debug_line); }
     58        .debug_line.dwo 0 : { *(.debug_line.dwo); }
     59        .debug_line_str 0 : { *(.debug_line_str); }
     60        .debug_loc 0 : { *(.debug_loc); }
     61        .debug_loclists 0 : { *(.debug_loclists); }
     62        .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); }
     63        .debug_macinfo 0 : { *(.debug_macinfo); }
     64        .debug_macro 0 : { *(.debug_macro); }
     65        .debug_macro.dwo 0 : { *(.debug_macro.dwo); }
     66        .debug_names 0 : { *(.debug_names); }
     67        .debug_pubnames 0 : { *(.debug_pubnames); }
     68        .debug_pubtypes 0 : { *(.debug_pubtypes); }
     69        .debug_ranges 0 : { *(.debug_ranges); }
     70        .debug_rnglists 0 : { *(.debug_rnglists); }
     71        .debug_str 0 : { *(.debug_str); }
     72        .debug_str.dwo 0 : { *(.debug_str.dwo); }
     73        .debug_str_offsets 0 : { *(.debug_str_offsets); }
     74        .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); }
     75        .debug_tu_index 0 : { *(.debug_tu_index); }
     76        .debug_types 0 : { *(.debug_types); }
    4977
    5078        /DISCARD/ : {
Note: See TracChangeset for help on using the changeset viewer.