aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2022-12-04 04:41:05 +0000
committerWarner Losh <imp@FreeBSD.org>2023-01-24 21:49:42 +0000
commit743ee03d7289ec1296c78eff5c3b10215dca132f (patch)
treee55735458b5ddb1fb467b835aad67d1d795af2cb
parent583dde3da0b64e772e0f10c1485d55cf2375d311 (diff)
downloadsrc-743ee03d7289ec1296c78eff5c3b10215dca132f.tar.gz
src-743ee03d7289ec1296c78eff5c3b10215dca132f.zip
kboot: powerpc ldscript catchup
Catch up with the latest ldscript for powerpc. Make it match others in the tree. Sponsored by: Netflix (cherry picked from commit e3b74ec119a7d98a0f340674e28923707b7166b4)
-rw-r--r--stand/kboot/arch/powerpc64/ldscript.powerpc48
1 files changed, 38 insertions, 10 deletions
diff --git a/stand/kboot/arch/powerpc64/ldscript.powerpc b/stand/kboot/arch/powerpc64/ldscript.powerpc
index 729113695105..662871eb7c09 100644
--- a/stand/kboot/arch/powerpc64/ldscript.powerpc
+++ b/stand/kboot/arch/powerpc64/ldscript.powerpc
@@ -10,15 +10,7 @@ SECTIONS
{
/* Read-only sections, merged into text segment: */
. = 0x100000;
- .text :
- {
- *(.text)
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- *(.gnu.linkonce.t*)
- } =0
- _etext = .;
- .interp : { *(.interp) }
+ .interp : { *(.interp) } :text
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
@@ -40,7 +32,9 @@ SECTIONS
.rela.fini : { *(.rela.fini) }
.rela.bss : { *(.rela.bss) }
.rela.plt : { *(.rela.plt) }
+ .rela.sdata : { *(.rela.sdata) }
.rela.sbss : { *(.rela.sbss) }
+ .rela.sdata2 : { *(.rela.sdata2) }
.rela.sbss2 : { *(.rela.sbss2) }
.text :
{
@@ -55,9 +49,11 @@ SECTIONS
.fini : { *(.fini) } =0
.rodata : { *(.rodata) *(.gnu.linkonce.r*) }
.rodata1 : { *(.rodata1) }
+ .sdata2 : { *(.sdata2) }
.sbss2 : { *(.sbss2) }
/* Adjust the address for the data segment to the next page up. */
. = ((. + 0x1000) & ~(0x1000 - 1));
+ .data.rel.ro : { *(.data.rel.ro*) }
.data :
{
*(.data)
@@ -86,6 +82,10 @@ SECTIONS
.got : { *(.got) }
.got.plt : { *(.got.plt) }
PROVIDE (_GOT_END_ = .);
+ /* We want the small data sections together, so single-instruction offsets
+ can access them all, and initialized data all before uninitialized, so
+ we can shorten the on-disk segment size. */
+ .sdata : { *(.sdata) }
_edata = .;
PROVIDE (edata = .);
.sbss :
@@ -107,5 +107,33 @@ SECTIONS
. = ALIGN(4096);
_end = . ;
PROVIDE (end = .);
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ /* 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) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .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) }
+ /* These must appear regardless of . */
}
-