Step 2: sync sys/conf/ldscript.i386 with the binutils 2.17.50 version,
again preserving FreeBSD-specific customizations.
This commit is contained in:
parent
0dd487b08a
commit
f646247d0d
@ -9,6 +9,7 @@ SECTIONS
|
|||||||
. = kernbase + kernload + SIZEOF_HEADERS;
|
. = kernbase + kernload + SIZEOF_HEADERS;
|
||||||
.interp : { *(.interp) }
|
.interp : { *(.interp) }
|
||||||
.hash : { *(.hash) }
|
.hash : { *(.hash) }
|
||||||
|
.gnu.hash : { *(.gnu.hash) }
|
||||||
.dynsym : { *(.dynsym) }
|
.dynsym : { *(.dynsym) }
|
||||||
.dynstr : { *(.dynstr) }
|
.dynstr : { *(.dynstr) }
|
||||||
.gnu.version : { *(.gnu.version) }
|
.gnu.version : { *(.gnu.version) }
|
||||||
@ -22,6 +23,8 @@ SECTIONS
|
|||||||
.rela.fini : { *(.rela.fini) }
|
.rela.fini : { *(.rela.fini) }
|
||||||
.rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
|
.rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
|
||||||
.rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
|
.rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
|
||||||
|
.rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
|
||||||
|
.rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
|
||||||
.rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
|
.rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
|
||||||
.rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
|
.rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
|
||||||
.rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
|
.rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
|
||||||
@ -46,6 +49,7 @@ SECTIONS
|
|||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||||
|
KEEP (*(.text.*personality*))
|
||||||
/* .gnu.warning sections are handled specially by elf32.em. */
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
} =0x90909090
|
} =0x90909090
|
||||||
@ -59,34 +63,37 @@ SECTIONS
|
|||||||
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
|
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
|
||||||
.rodata1 : { *(.rodata1) }
|
.rodata1 : { *(.rodata1) }
|
||||||
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||||
|
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||||
|
.gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
|
||||||
/* Adjust the address for the data segment. We want to adjust up to
|
/* Adjust the address for the data segment. We want to adjust up to
|
||||||
the same address within the page on the next page up. */
|
the same address within the page on the next page up. */
|
||||||
. = ALIGN (0x1000) - ((0x1000 - .) & (0x1000 - 1)); . = DATA_SEGMENT_ALIGN (0x1000, 0x1000);
|
. = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
|
||||||
/* Ensure the __preinit_array_start label is properly aligned. We
|
/* Exception handling */
|
||||||
could instead move the label definition inside the section, but
|
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
||||||
the linker would then create the section even if it turns out to
|
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
|
||||||
be empty, which isn't pretty. */
|
/* Thread Local Storage sections */
|
||||||
. = ALIGN(32 / 8);
|
|
||||||
PROVIDE (__preinit_array_start = .);
|
|
||||||
.preinit_array : { *(.preinit_array) }
|
|
||||||
PROVIDE (__preinit_array_end = .);
|
|
||||||
PROVIDE (__init_array_start = .);
|
|
||||||
.init_array : { *(.init_array) }
|
|
||||||
PROVIDE (__init_array_end = .);
|
|
||||||
PROVIDE (__fini_array_start = .);
|
|
||||||
.fini_array : { *(.fini_array) }
|
|
||||||
PROVIDE (__fini_array_end = .);
|
|
||||||
.data :
|
|
||||||
{
|
|
||||||
*(.data .data.* .gnu.linkonce.d.*)
|
|
||||||
SORT(CONSTRUCTORS)
|
|
||||||
}
|
|
||||||
.data1 : { *(.data1) }
|
|
||||||
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
||||||
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
||||||
.eh_frame : { KEEP (*(.eh_frame)) }
|
.preinit_array :
|
||||||
.gcc_except_table : { *(.gcc_except_table) }
|
{
|
||||||
.dynamic : { *(.dynamic) }
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
KEEP (*(.preinit_array))
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
}
|
||||||
|
.init_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
}
|
||||||
|
.fini_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
KEEP (*(.fini_array))
|
||||||
|
KEEP (*(SORT(.fini_array.*)))
|
||||||
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
}
|
||||||
_start_ctors = .;
|
_start_ctors = .;
|
||||||
PROVIDE (start_ctors = .);
|
PROVIDE (start_ctors = .);
|
||||||
.ctors :
|
.ctors :
|
||||||
@ -100,12 +107,13 @@ SECTIONS
|
|||||||
wildcard. The wildcard also means that it
|
wildcard. The wildcard also means that it
|
||||||
doesn't matter which directory crtbegin.o
|
doesn't matter which directory crtbegin.o
|
||||||
is in. */
|
is in. */
|
||||||
KEEP (*crtbegin*.o(.ctors))
|
KEEP (*crtbegin.o(.ctors))
|
||||||
|
KEEP (*crtbegin?.o(.ctors))
|
||||||
/* We don't want to include the .ctor section from
|
/* We don't want to include the .ctor section from
|
||||||
from the crtend.o file until after the sorted ctors.
|
the crtend.o file until after the sorted ctors.
|
||||||
The .ctor section from the crtend file contains the
|
The .ctor section from the crtend file contains the
|
||||||
end of ctors marker and it must be last */
|
end of ctors marker and it must be last */
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
|
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
|
||||||
KEEP (*(SORT(.ctors.*)))
|
KEEP (*(SORT(.ctors.*)))
|
||||||
KEEP (*(.ctors))
|
KEEP (*(.ctors))
|
||||||
}
|
}
|
||||||
@ -113,15 +121,26 @@ SECTIONS
|
|||||||
PROVIDE (stop_ctors = .);
|
PROVIDE (stop_ctors = .);
|
||||||
.dtors :
|
.dtors :
|
||||||
{
|
{
|
||||||
KEEP (*crtbegin*.o(.dtors))
|
KEEP (*crtbegin.o(.dtors))
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
|
KEEP (*crtbegin?.o(.dtors))
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
|
||||||
KEEP (*(SORT(.dtors.*)))
|
KEEP (*(SORT(.dtors.*)))
|
||||||
KEEP (*(.dtors))
|
KEEP (*(.dtors))
|
||||||
}
|
}
|
||||||
.jcr : { KEEP (*(.jcr)) }
|
.jcr : { KEEP (*(.jcr)) }
|
||||||
.got : { *(.got.plt) *(.got) }
|
.data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
|
||||||
_edata = .;
|
.dynamic : { *(.dynamic) }
|
||||||
PROVIDE (edata = .);
|
.got : { *(.got) }
|
||||||
|
. = DATA_SEGMENT_RELRO_END (12, .);
|
||||||
|
.got.plt : { *(.got.plt) }
|
||||||
|
.data :
|
||||||
|
{
|
||||||
|
*(.data .data.* .gnu.linkonce.d.*)
|
||||||
|
KEEP (*(.gnu.linkonce.d.*personality*))
|
||||||
|
SORT(CONSTRUCTORS)
|
||||||
|
}
|
||||||
|
.data1 : { *(.data1) }
|
||||||
|
_edata = .; PROVIDE (edata = .);
|
||||||
__bss_start = .;
|
__bss_start = .;
|
||||||
.bss :
|
.bss :
|
||||||
{
|
{
|
||||||
@ -130,12 +149,14 @@ SECTIONS
|
|||||||
*(COMMON)
|
*(COMMON)
|
||||||
/* Align here to ensure that the .bss section occupies space up to
|
/* Align here to ensure that the .bss section occupies space up to
|
||||||
_end. Align after .bss to ensure correct alignment even if the
|
_end. Align after .bss to ensure correct alignment even if the
|
||||||
.bss section disappears because there are no input sections. */
|
.bss section disappears because there are no input sections.
|
||||||
. = ALIGN(32 / 8);
|
FIXME: Why do we need it? When there is no .bss section, we don't
|
||||||
|
pad the .data section. */
|
||||||
|
. = ALIGN(. != 0 ? 32 / 8 : 1);
|
||||||
}
|
}
|
||||||
. = ALIGN(32 / 8);
|
. = ALIGN(32 / 8);
|
||||||
_end = .;
|
. = ALIGN(32 / 8);
|
||||||
PROVIDE (end = .);
|
_end = .; PROVIDE (end = .);
|
||||||
. = DATA_SEGMENT_END (.);
|
. = DATA_SEGMENT_END (.);
|
||||||
/* Stabs debugging sections. */
|
/* Stabs debugging sections. */
|
||||||
.stab 0 : { *(.stab) }
|
.stab 0 : { *(.stab) }
|
||||||
@ -170,5 +191,9 @@ SECTIONS
|
|||||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
.debug_typenames 0 : { *(.debug_typenames) }
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
.debug_varnames 0 : { *(.debug_varnames) }
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
/* DWARF 3 */
|
||||||
|
.debug_pubtypes 0 : { *(.debug_pubtypes) }
|
||||||
|
.debug_ranges 0 : { *(.debug_ranges) }
|
||||||
|
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
|
||||||
/DISCARD/ : { *(.note.GNU-stack) }
|
/DISCARD/ : { *(.note.GNU-stack) }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user