Mon May 12 11:11:06 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* scripttempl/elf.sc: Don't align the data segment on the next 8 byte boundary, instead let the linker use whatever the individual sections require.
This commit is contained in:
parent
9af5dcea8f
commit
3d046499bc
|
@ -1,3 +1,9 @@
|
||||||
|
Mon May 12 11:11:06 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
|
* scripttempl/elf.sc: Don't align the data segment on the next 8
|
||||||
|
byte boundary, instead let the linker use whatever the individual
|
||||||
|
sections require.
|
||||||
|
|
||||||
Fri May 9 17:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
|
Fri May 9 17:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* configure.tgt (i[3456]86-*-gnu*): Don't include Mach support.
|
* configure.tgt (i[3456]86-*-gnu*): Don't include Mach support.
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
|
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
|
||||||
# .bss section besides __bss_start.
|
# .bss section besides __bss_start.
|
||||||
# DATA_PLT - .plt should be in data segment, not text segment.
|
# DATA_PLT - .plt should be in data segment, not text segment.
|
||||||
|
# EMBEDDED - whether this is for an embedded system.
|
||||||
#
|
#
|
||||||
# When adding sections, do note that the names of some sections are used
|
# When adding sections, do note that the names of some sections are used
|
||||||
# when specifying the start address of the next.
|
# when specifying the start address of the next.
|
||||||
|
@ -27,6 +28,14 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI
|
||||||
test "$LD_FLAG" = "N" && DATA_ADDR=.
|
test "$LD_FLAG" = "N" && DATA_ADDR=.
|
||||||
INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
|
INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
|
||||||
PLT=".plt ${RELOCATING-0} : { *(.plt) }"
|
PLT=".plt ${RELOCATING-0} : { *(.plt) }"
|
||||||
|
|
||||||
|
# if this is for an embedded system, don't add SIZEOF_HEADERS.
|
||||||
|
if [ -z "$EMBEDDED" ]; then
|
||||||
|
test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
|
||||||
|
else
|
||||||
|
test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
|
||||||
|
fi
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
|
OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
|
||||||
"${LITTLE_OUTPUT_FORMAT}")
|
"${LITTLE_OUTPUT_FORMAT}")
|
||||||
|
@ -44,18 +53,27 @@ ${RELOCATING- /* For some reason, the Solaris linker makes bad executables
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* Read-only sections, merged into text segment: */
|
/* Read-only sections, merged into text segment: */
|
||||||
${CREATE_SHLIB-${RELOCATING+. = ${TEXT_START_ADDR} + SIZEOF_HEADERS;}}
|
${CREATE_SHLIB-${RELOCATING+. = ${TEXT_BASE_ADDRESS};}}
|
||||||
${CREATE_SHLIB+${RELOCATING+. = SIZEOF_HEADERS;}}
|
${CREATE_SHLIB+${RELOCATING+. = SIZEOF_HEADERS;}}
|
||||||
${CREATE_SHLIB-${INTERP}}
|
${CREATE_SHLIB-${INTERP}}
|
||||||
.hash ${RELOCATING-0} : { *(.hash) }
|
.hash ${RELOCATING-0} : { *(.hash) }
|
||||||
.dynsym ${RELOCATING-0} : { *(.dynsym) }
|
.dynsym ${RELOCATING-0} : { *(.dynsym) }
|
||||||
.dynstr ${RELOCATING-0} : { *(.dynstr) }
|
.dynstr ${RELOCATING-0} : { *(.dynstr) }
|
||||||
.rel.text ${RELOCATING-0} : { *(.rel.text) }
|
.gnu.version ${RELOCATING-0} : { *(.gnu.version) }
|
||||||
.rela.text ${RELOCATING-0} : { *(.rela.text) }
|
.gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
|
||||||
.rel.data ${RELOCATING-0} : { *(.rel.data) }
|
.gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
|
||||||
.rela.data ${RELOCATING-0} : { *(.rela.data) }
|
.rel.text ${RELOCATING-0} :
|
||||||
.rel.rodata ${RELOCATING-0} : { *(.rel.rodata) }
|
{ *(.rel.text) *(.rel.gnu.linkonce.t*) }
|
||||||
.rela.rodata ${RELOCATING-0} : { *(.rela.rodata) }
|
.rela.text ${RELOCATING-0} :
|
||||||
|
{ *(.rela.text) *(.rela.gnu.linkonce.t*) }
|
||||||
|
.rel.data ${RELOCATING-0} :
|
||||||
|
{ *(.rel.data) *(.rel.gnu.linkonce.d*) }
|
||||||
|
.rela.data ${RELOCATING-0} :
|
||||||
|
{ *(.rela.data) *(.rela.gnu.linkonce.d*) }
|
||||||
|
.rel.rodata ${RELOCATING-0} :
|
||||||
|
{ *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
|
||||||
|
.rela.rodata ${RELOCATING-0} :
|
||||||
|
{ *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
|
||||||
.rel.got ${RELOCATING-0} : { *(.rel.got) }
|
.rel.got ${RELOCATING-0} : { *(.rel.got) }
|
||||||
.rela.got ${RELOCATING-0} : { *(.rela.got) }
|
.rela.got ${RELOCATING-0} : { *(.rela.got) }
|
||||||
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
|
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
|
||||||
|
@ -78,32 +96,43 @@ SECTIONS
|
||||||
*(.text)
|
*(.text)
|
||||||
/* .gnu.warning sections are handled specially by elf32.em. */
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
*(.gnu.linkonce*)
|
*(.gnu.linkonce.t*)
|
||||||
} =${NOP-0}
|
} =${NOP-0}
|
||||||
${RELOCATING+_etext = .;}
|
${RELOCATING+_etext = .;}
|
||||||
${RELOCATING+PROVIDE (etext = .);}
|
${RELOCATING+PROVIDE (etext = .);}
|
||||||
.fini ${RELOCATING-0} : { *(.fini) } =${NOP-0}
|
.fini ${RELOCATING-0} : { *(.fini) } =${NOP-0}
|
||||||
.rodata ${RELOCATING-0} : { *(.rodata) }
|
.rodata ${RELOCATING-0} : { *(.rodata) *(.gnu.linkonce.r*) }
|
||||||
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
|
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
|
||||||
${RELOCATING+${OTHER_READONLY_SECTIONS}}
|
${RELOCATING+${OTHER_READONLY_SECTIONS}}
|
||||||
|
|
||||||
/* 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. */
|
||||||
${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (ALIGN(8) & (${MAXPAGESIZE} - 1))};}
|
${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}
|
||||||
|
|
||||||
.data ${RELOCATING-0} :
|
.data ${RELOCATING-0} :
|
||||||
{
|
{
|
||||||
${RELOCATING+${DATA_START_SYMBOLS}}
|
${RELOCATING+${DATA_START_SYMBOLS}}
|
||||||
*(.data)
|
*(.data)
|
||||||
|
*(.gnu.linkonce.d*)
|
||||||
${CONSTRUCTING+CONSTRUCTORS}
|
${CONSTRUCTING+CONSTRUCTORS}
|
||||||
}
|
}
|
||||||
.data1 ${RELOCATING-0} : { *(.data1) }
|
.data1 ${RELOCATING-0} : { *(.data1) }
|
||||||
${RELOCATING+${OTHER_READWRITE_SECTIONS}}
|
${RELOCATING+${OTHER_READWRITE_SECTIONS}}
|
||||||
.ctors ${RELOCATING-0} : { *(.ctors) }
|
.ctors ${RELOCATING-0} :
|
||||||
.dtors ${RELOCATING-0} : { *(.dtors) }
|
{
|
||||||
|
${CONSTRUCTING+${CTOR_START}}
|
||||||
|
*(.ctors)
|
||||||
|
${CONSTRUCTING+${CTOR_END}}
|
||||||
|
}
|
||||||
|
.dtors ${RELOCATING-0} :
|
||||||
|
{
|
||||||
|
${CONSTRUCTING+${DTOR_START}}
|
||||||
|
*(.dtors)
|
||||||
|
${CONSTRUCTING+${DTOR_END}}
|
||||||
|
}
|
||||||
|
${DATA_PLT+${PLT}}
|
||||||
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
|
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
|
||||||
.dynamic ${RELOCATING-0} : { *(.dynamic) }
|
.dynamic ${RELOCATING-0} : { *(.dynamic) }
|
||||||
${DATA_PLT+${PLT}}
|
|
||||||
/* We want the small data sections together, so single-instruction offsets
|
/* We want the small data sections together, so single-instruction offsets
|
||||||
can access them all, and initialized data all before uninitialized, so
|
can access them all, and initialized data all before uninitialized, so
|
||||||
we can shorten the on-disk segment size. */
|
we can shorten the on-disk segment size. */
|
||||||
|
@ -133,15 +162,37 @@ SECTIONS
|
||||||
.comment 0 : { *(.comment) }
|
.comment 0 : { *(.comment) }
|
||||||
|
|
||||||
/* DWARF debug sections.
|
/* DWARF debug sections.
|
||||||
Symbols in the .debug DWARF section are relative to the beginning of the
|
Symbols in the DWARF debugging sections are relative to the beginning
|
||||||
section so we begin .debug at 0. It's not clear yet what needs to happen
|
of the section so we begin them at 0. */
|
||||||
for the others. */
|
|
||||||
|
/* DWARF 1 */
|
||||||
.debug 0 : { *(.debug) }
|
.debug 0 : { *(.debug) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
|
||||||
.line 0 : { *(.line) }
|
/* 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) }
|
||||||
|
|
||||||
|
${RELOCATING+${OTHER_RELOCATING_SECTIONS}}
|
||||||
|
|
||||||
/* These must appear regardless of ${RELOCATING}. */
|
/* These must appear regardless of ${RELOCATING}. */
|
||||||
${OTHER_SECTIONS}
|
${OTHER_SECTIONS}
|
||||||
|
|
Loading…
Reference in New Issue