diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2019-04-14 22:50:39 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-04-17 09:26:40 +1000 |
commit | 6b08928fb487f4303099ab112ffc23f37a236413 (patch) | |
tree | 19854e0f2086125aee79f96fb3487f2409ed2089 | |
parent | 36dca1e915dae14aba931edfc9786dddcac44ae6 (diff) | |
download | skiboot-6b08928fb487f4303099ab112ffc23f37a236413.zip skiboot-6b08928fb487f4303099ab112ffc23f37a236413.tar.gz skiboot-6b08928fb487f4303099ab112ffc23f37a236413.tar.bz2 |
build/lds: place debug sections according to defaults
Place debug orphan linker sections according to default script
as described by `ld --verbose`.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r-- | skiboot.lds.S | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/skiboot.lds.S b/skiboot.lds.S index 6f6f771..967fdbf 100644 --- a/skiboot.lds.S +++ b/skiboot.lds.S @@ -17,6 +17,49 @@ #include <config.h> #include <mem-map.h> +/* Debug sections from binutils `ld --verbose` */ + +#define DEBUG_SECTIONS \ + /* Stabs debugging sections. */ \ + .stab 0 : { *(.stab) } \ + .stabstr 0 : { *(.stabstr) } \ + .stab.excl 0 : { *(.stab.excl) } \ + .stab.exclstr 0 : { *(.stab.exclstr) } \ + .stab.index 0 : { *(.stab.index) } \ + .stab.indexstr 0 : { *(.stab.indexstr) } \ + .comment 0 : { *(.comment) } \ + /* DWARF debug sections. \ + Symbols in the DWARF debugging sections are relative to the beginning \ + of the section so we begin them at 0. */ \ + /* DWARF 1 */ \ + .debug 0 : { *(.debug) } \ + .line 0 : { *(.line) } \ + /* GNU DWARF 1 extensions */ \ + .debug_srcinfo 0 : { *(.debug_srcinfo) } \ + .debug_sfnames 0 : { *(.debug_sfnames) } \ + /* DWARF 1.1 and DWARF 2 */ \ + .debug_aranges 0 : { *(.debug_aranges) } \ + .debug_pubnames 0 : { *(.debug_pubnames) } \ + /* DWARF 2 */ \ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } \ + .debug_abbrev 0 : { *(.debug_abbrev) } \ + .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) } \ + .debug_frame 0 : { *(.debug_frame) } \ + .debug_str 0 : { *(.debug_str) } \ + .debug_loc 0 : { *(.debug_loc) } \ + .debug_macinfo 0 : { *(.debug_macinfo) } \ + /* SGI/MIPS DWARF 2 extensions */ \ + .debug_weaknames 0 : { *(.debug_weaknames) } \ + .debug_funcnames 0 : { *(.debug_funcnames) } \ + .debug_typenames 0 : { *(.debug_typenames) } \ + .debug_varnames 0 : { *(.debug_varnames) } \ + /* DWARF 3 */ \ + .debug_pubtypes 0 : { *(.debug_pubtypes) } \ + .debug_ranges 0 : { *(.debug_ranges) } \ + /* DWARF Extension. */ \ + .debug_macro 0 : { *(.debug_macro) } \ + .debug_addr 0 : { *(.debug_addr) } + ENTRY(boot_entry); SECTIONS { @@ -164,6 +207,8 @@ SECTIONS _ebss = .; _end = .; + DEBUG_SECTIONS + /* Optional kernel image */ . = ALIGN(0x10000); .builtin_kernel : { |