* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.

(config.status): Delete rule.
	Add extra dependencies to cover sourced emulparams files.
	* Makefile.in: Regenerate.

	* scripttempl/elf.sc: Order <section>, <section>.* and
	corresponding linkonce sections as seen in input files.
	Formatting fixes.  Zero vma of all sections if not relocating.
	(STACK): Define and insert if STACK_ADDR defined.
	(OTHER_RELOCATING_SECTIONS): Delete.
	(OTHER_END_SYMBOLS): Define.
	(OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
	(OTHER_READWRITE_SECTIONS): Likewise.
	(OTHER_GOT_SECTIONS): Likewise.
	(OTHER_SDATA_SECTIONS): Likewise.
	(OTHER_BSS_SECTIONS): Likewise.
	* scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
	(OTHER_READWRITE_SECTIONS): Likewise.
	* scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
	(OTHER_READWRITE_SECTIONS): Likewise

	* emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
	(STACK_ADDR): Define.
	* emulparams/armelf_oabi.sh: As for armelf.sh.
	* emulparams/elf32mcore.sh: As for armelf.sh.
	* emulparams/h8300elf.sh: As for armelf.sh.
	* emulparams/mn10200.sh: As for armelf.sh.
	* emulparams/shelf.sh: As for armelf.sh.

	* emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
	(OTHER_END_SYMBOLS): Define.
	* emulparams/m32relf.sh: As for elf32fr30.sh.
	* emulparams/h8300helf.sh: As for elf32fr30.sh.
	* emulparams/h8300self.sh: As for elf32fr30.sh.

	* emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
	defines with RELOCATING test.
	(OTHER_SDATA_SECTIONS): Likewise.
	(OTHER_RELOCATING_SECTIONS): Delete, replacing with..
	(OTHER_END_SYMBOLS): ..this.
	* emulparams/crislinux.sh: As for criself.sh.

	* emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
	if not relocating.
	(OTHER_RELOCATING_SECTIONS): Delete, replacing with..
	(OTHER_SECTIONS): ..this.  Zero vma if not relocating.  Order
	normal and linkonce sections as seen in input files.
	* emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
	(TEXT_DYNAMIC): Likewise.
	(INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
	(OTHER_SDATA_SECTIONS): Likewise.
	* emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
	* emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
	* emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
	* emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
	* emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
	(OTHER_PLT_RELOC_SECTIONS): Likewise.
	(OTHER_READONLY_SECTIONS): Likewise.  Order normal and linkonce
	sections as seen in input files.
	* emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
	* emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
	if not relocating.
	(OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
	(OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
	* emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
	(OTHER_SECTIONS): Instead, use this..
	(OTHER_END_SYMBOLS): ..and this.

	* emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
	* emulparams/elf32bsmip.sh: Likewise.
	* emulparams/elf32btsmip.sh: Likewise.
	* emulparams/elf32ebmip.sh: Likewise.
	* emulparams/elf32lmip.sh: Likewise.
	* emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
	* emulparams/elf32lsmip.sh: Likewise.
	* emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
	* emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
	* emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
	* emulparams/elf64btsmip.sh: Likewise.
	* emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
	* emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
	* emulparams/elf32ppclinux.sh: Likewise.
	* emulparams/elf32ppcsim.sh: Likewise.
	* emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
	* emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
	* emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
	* emulparams/h8300self.sh: Likewise.
	* emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
	* emulparams/sh.sh: Comment.
	* emulparams/shl.sh: Source sh.sh, remove duplicates.
	* emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
	* emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
This commit is contained in:
Alan Modra 2001-11-22 09:08:05 +00:00
parent 172d914f22
commit 465bc359f9
50 changed files with 736 additions and 1255 deletions

View file

@ -1,3 +1,98 @@
2001-11-22 Alan Modra <amodra@bigpond.net.au>
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
(config.status): Delete rule.
Add extra dependencies to cover sourced emulparams files.
* Makefile.in: Regenerate.
* scripttempl/elf.sc: Order <section>, <section>.* and
corresponding linkonce sections as seen in input files.
Formatting fixes. Zero vma of all sections if not relocating.
(STACK): Define and insert if STACK_ADDR defined.
(OTHER_RELOCATING_SECTIONS): Delete.
(OTHER_END_SYMBOLS): Define.
(OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
(OTHER_READWRITE_SECTIONS): Likewise.
(OTHER_GOT_SECTIONS): Likewise.
(OTHER_SDATA_SECTIONS): Likewise.
(OTHER_BSS_SECTIONS): Likewise.
* scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
(OTHER_READWRITE_SECTIONS): Likewise.
* scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
(OTHER_READWRITE_SECTIONS): Likewise
* emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
(STACK_ADDR): Define.
* emulparams/armelf_oabi.sh: As for armelf.sh.
* emulparams/elf32mcore.sh: As for armelf.sh.
* emulparams/h8300elf.sh: As for armelf.sh.
* emulparams/mn10200.sh: As for armelf.sh.
* emulparams/shelf.sh: As for armelf.sh.
* emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
(OTHER_END_SYMBOLS): Define.
* emulparams/m32relf.sh: As for elf32fr30.sh.
* emulparams/h8300helf.sh: As for elf32fr30.sh.
* emulparams/h8300self.sh: As for elf32fr30.sh.
* emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
defines with RELOCATING test.
(OTHER_SDATA_SECTIONS): Likewise.
(OTHER_RELOCATING_SECTIONS): Delete, replacing with..
(OTHER_END_SYMBOLS): ..this.
* emulparams/crislinux.sh: As for criself.sh.
* emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
if not relocating.
(OTHER_RELOCATING_SECTIONS): Delete, replacing with..
(OTHER_SECTIONS): ..this. Zero vma if not relocating. Order
normal and linkonce sections as seen in input files.
* emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
(TEXT_DYNAMIC): Likewise.
(INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
(OTHER_SDATA_SECTIONS): Likewise.
* emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
* emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
* emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
* emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
* emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
(OTHER_PLT_RELOC_SECTIONS): Likewise.
(OTHER_READONLY_SECTIONS): Likewise. Order normal and linkonce
sections as seen in input files.
* emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
* emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
if not relocating.
(OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
(OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
* emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
(OTHER_SECTIONS): Instead, use this..
(OTHER_END_SYMBOLS): ..and this.
* emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
* emulparams/elf32bsmip.sh: Likewise.
* emulparams/elf32btsmip.sh: Likewise.
* emulparams/elf32ebmip.sh: Likewise.
* emulparams/elf32lmip.sh: Likewise.
* emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
* emulparams/elf32lsmip.sh: Likewise.
* emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
* emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
* emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
* emulparams/elf64btsmip.sh: Likewise.
* emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
* emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
* emulparams/elf32ppclinux.sh: Likewise.
* emulparams/elf32ppcsim.sh: Likewise.
* emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
* emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
* emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
* emulparams/h8300self.sh: Likewise.
* emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
* emulparams/sh.sh: Comment.
* emulparams/shl.sh: Source sh.sh, remove duplicates.
* emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
* emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
2001-11-21 David Heine <dlheine@tensilica.com> 2001-11-21 David Heine <dlheine@tensilica.com>
Alan Modra <amodra@bigpond.net.au> Alan Modra <amodra@bigpond.net.au>
@ -44,7 +139,7 @@
Tue Nov 13 11:27:14 2001 Ross Alexander <ross.alexander@uk.neceur.com> Tue Nov 13 11:27:14 2001 Ross Alexander <ross.alexander@uk.neceur.com>
* emulparams/elf64hppa.sh (OTHER_BSS_END_SECTIONS): Add * emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
additional symbols referenced by newer crt0.o files from HP. additional symbols referenced by newer crt0.o files from HP.
2001-11-12 Anthony Green <green@redhat.com> 2001-11-12 Anthony Green <green@redhat.com>

View file

@ -459,42 +459,53 @@ eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)" ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \ eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
$(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)" ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \ eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)" ${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \ eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
$(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)" ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \ eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
$(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)" ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \ eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
$(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)" ${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \ eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
$(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)" ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \ eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)" ${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \ eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)" ${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \ eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
$(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)" ${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \ eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
$(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)" ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \ eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
$(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)" ${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \ eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
$(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)" ${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \ eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)" ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \ eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
@ -504,15 +515,18 @@ eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)" ${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \ eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
$(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)" ${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \ eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
$(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)" ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh \ eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)" ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \ eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
$(srcdir)/emulparams/elf64ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)" ${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
@ -522,6 +536,7 @@ eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)" ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \ eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
$(srcdir)/emulparams/hppa64linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)" ${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \ eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
@ -538,6 +553,7 @@ eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)" ${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \ eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
$(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)" ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \ eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
@ -549,9 +565,11 @@ emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
$(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS} $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
${GENSCRIPTS} mmo "$(tdir_mmo)" ${GENSCRIPTS} mmo "$(tdir_mmo)"
eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \ eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
$(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)" ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \ eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
$(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)" ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
@ -591,9 +609,11 @@ eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300elf "$(tdir_h8300elf)" ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \ eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
$(srcdir)/emulparams/h8300elf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300helf "$(tdir_h8300helf)" ${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
eh8300self.c: $(srcdir)/emulparams/h8300self.sh \ eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
$(srcdir)/emulparams/h8300elf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300self "$(tdir_h8300self)" ${GENSCRIPTS} h8300self "$(tdir_h8300self)"
eh8500.c: $(srcdir)/emulparams/h8500.sh \ eh8500.c: $(srcdir)/emulparams/h8500.sh \
@ -741,6 +761,7 @@ emipspe.c: $(srcdir)/emulparams/mipspe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS} $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipspe "$(tdir_mips)" ${GENSCRIPTS} mipspe "$(tdir_mips)"
emn10300.c: $(srcdir)/emulparams/mn10300.sh \ emn10300.c: $(srcdir)/emulparams/mn10300.sh \
$(srcdir)/emulparams/mn10200.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10300 "$(tdir_mn10300)" ${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
emn10200.c: $(srcdir)/emulparams/mn10200.sh \ emn10200.c: $(srcdir)/emulparams/mn10200.sh \
@ -786,15 +807,18 @@ eshelf.c: $(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf "$(tdir_shelf)" ${GENSCRIPTS} shelf "$(tdir_shelf)"
eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \ eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
$(srcdir)/emulparams/shlelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)" ${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \ eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)" ${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \ eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf "$(tdir_shlelf)" ${GENSCRIPTS} shlelf "$(tdir_shlelf)"
eshl.c: $(srcdir)/emulparams/shl.sh \ eshl.c: $(srcdir)/emulparams/shl.sh \
$(srcdir)/emulparams/sh.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} shl "$(tdir_shl)" ${GENSCRIPTS} shl "$(tdir_shl)"
eshpe.c: $(srcdir)/emulparams/shpe.sh \ eshpe.c: $(srcdir)/emulparams/shpe.sh \
@ -982,8 +1006,7 @@ ld.1: $(srcdir)/ld.texinfo
MAINTAINERCLEANFILES = ldver.texi MAINTAINERCLEANFILES = ldver.texi
# We want to reconfigure if configure.host or configure.tgt changes. # We want to reconfigure if configure.host or configure.tgt changes.
config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
$(SHELL) ./config.status --recheck
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \ MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum ldemul-list.h crtbegin.o crtend.o ld.log ld.sum

File diff suppressed because it is too large Load diff

View file

@ -20,6 +20,5 @@ MAXPAGESIZE=256
ENTRY=_start ENTRY=_start
EMBEDDED=yes EMBEDDED=yes
# Hmmm, there's got to be a better way. This sets the stack to the # This sets the stack to the top of the simulator memory (2^19 bytes).
# top of the simulator memory (2^19 bytes). STACK_ADDR=0x80000
OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'

View file

@ -16,6 +16,5 @@ MAXPAGESIZE=256
ENTRY=_start ENTRY=_start
EMBEDDED=yes EMBEDDED=yes
# Hmmm, there's got to be a better way. This sets the stack to the # This sets the stack to the top of the simulator memory (2^19 bytes).
# top of the simulator memory (2^19 bytes). STACK_ADDR=0x80000
OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'

View file

@ -32,11 +32,11 @@ __start = DEFINED(__start) ? __start :
' '
# Smuggle an "OTHER_TEXT_END_SYMBOLS" here. # Smuggle an "OTHER_TEXT_END_SYMBOLS" here.
OTHER_READONLY_SECTIONS='PROVIDE (__Etext = .);' OTHER_READONLY_SECTIONS="${RELOCATING+PROVIDE (__Etext = .);}"
DATA_START_SYMBOLS='PROVIDE (__Sdata = .);' DATA_START_SYMBOLS='PROVIDE (__Sdata = .);'
# Smuggle an "OTHER_DATA_END_SYMBOLS" here. # Smuggle an "OTHER_DATA_END_SYMBOLS" here.
OTHER_SDATA_SECTIONS='PROVIDE (__Edata = .);' OTHER_SDATA_SECTIONS="${RELOCATING+PROVIDE (__Edata = .);}"
# If .bss does not immediately follow .data but has its own start # If .bss does not immediately follow .data but has its own start
# address, we can't get to it with OTHER_BSS_SYMBOLS, neither can we # address, we can't get to it with OTHER_BSS_SYMBOLS, neither can we
@ -95,11 +95,8 @@ CTOR_END='
___elf_ctors_dtors_end = .; ___elf_ctors_dtors_end = .;
' '
# Smuggle an "OTHER_ALL_END_SYMBOLS" here.
# Also add the other symbols provided for rsim/xsim and elinux. # Also add the other symbols provided for rsim/xsim and elinux.
OTHER_RELOCATING_SECTIONS=' OTHER_END_SYMBOLS="
PROVIDE (__Eall = .); PROVIDE (__Eall = .);
PROVIDE (__Endmem = 0x10000000); PROVIDE (__Endmem = 0x10000000);
PROVIDE (__Stacksize = 0); PROVIDE (__Stacksize = 0);"
'

View file

@ -22,18 +22,16 @@ MAXPAGESIZE=8192
TEXT_START_SYMBOLS='PROVIDE (__Stext = .);' TEXT_START_SYMBOLS='PROVIDE (__Stext = .);'
# Smuggle an "OTHER_TEXT_END_SYMBOLS" here. # Smuggle an "OTHER_TEXT_END_SYMBOLS" here.
OTHER_READONLY_SECTIONS='PROVIDE (__Etext = .);' OTHER_READONLY_SECTIONS="${RELOCATING+PROVIDE (__Etext = .);}"
DATA_START_SYMBOLS='PROVIDE (__Sdata = .);' DATA_START_SYMBOLS='PROVIDE (__Sdata = .);'
# Smuggle an "OTHER_DATA_END_SYMBOLS" here. # Smuggle an "OTHER_DATA_END_SYMBOLS" here.
OTHER_SDATA_SECTIONS='PROVIDE (__Edata = .);' OTHER_SDATA_SECTIONS="${RELOCATING+PROVIDE (__Edata = .);}"
OTHER_BSS_SYMBOLS='PROVIDE (__Sbss = .);' OTHER_BSS_SYMBOLS='PROVIDE (__Sbss = .);'
OTHER_BSS_END_SYMBOLS='PROVIDE (__Ebss = .);' OTHER_BSS_END_SYMBOLS='PROVIDE (__Ebss = .);'
# Smuggle an "OTHER_ALL_END_SYMBOLS" here.
# Also add the other symbols provided for rsim/xsim and elinux. # Also add the other symbols provided for rsim/xsim and elinux.
OTHER_RELOCATING_SECTIONS=' OTHER_END_SYMBOLS="
PROVIDE (__Eall = .); PROVIDE (__Eall = .);
PROVIDE(__Endmem = 0x10000000); PROVIDE (__Endmem = 0x10000000);
PROVIDE(__Stacksize = 0); PROVIDE (__Stacksize = 0);"
'

View file

@ -1,29 +1,10 @@
SCRIPT_NAME=elf # If you change this file, please also look at files which source this one:
OUTPUT_FORMAT="elf32-bigmips" # elf32l4300.sh
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0xa0020000
MAXPAGESIZE=0x40000
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
DYNAMIC_LINK=false
EMBEDDED=yes EMBEDDED=yes
. ${srcdir}/emulparams/elf32bmip.sh
TEXT_START_ADDR=0xa0020000
unset NONPAGED_TEXT_START_ADDR
unset SHLIB_TEXT_START_ADDR
EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
DYNAMIC_LINK=false

View file

@ -1,22 +1,27 @@
# If you change this file, please also look at files which source this one:
# elf32b4300.sh elf32bsmip.sh elf32btsmip.sh elf32ebmip.sh elf32lmip.sh
SCRIPT_NAME=elf SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-bigmips" OUTPUT_FORMAT="elf32-bigmips"
BIG_OUTPUT_FORMAT="elf32-bigmips" BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips" LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000 TEXT_START_ADDR=0x0400000
DATA_ADDR=0x10000000 test -n "${EMBEDDED}" || DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000 MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000 NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000 SHLIB_TEXT_START_ADDR=0x5ffe0000
TEXT_DYNAMIC= test -n "${EMBEDDED}" || TEXT_DYNAMIC=
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }' INITIAL_READONLY_SECTIONS="
.reginfo ${RELOCATING-0} : { *(.reginfo) }
"
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)' OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS=' OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0; _gp = ALIGN(16) + 0x7ff0;
' '
OTHER_SDATA_SECTIONS=' OTHER_SDATA_SECTIONS="
.lit8 : { *(.lit8) } .lit8 ${RELOCATING-0} : { *(.lit8) }
.lit4 : { *(.lit4) } .lit4 ${RELOCATING-0} : { *(.lit4) }
' "
TEXT_START_SYMBOLS='_ftext = . ;' TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;' DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;' OTHER_BSS_SYMBOLS='_fbss = .;'

View file

@ -1,3 +1,6 @@
# If you change this file, please also look at files which source this one:
# elf64bmip.sh elf64btsmip.sh
# This is an ELF platform. # This is an ELF platform.
SCRIPT_NAME=elf SCRIPT_NAME=elf
@ -17,11 +20,11 @@ ENTRY=__start
OTHER_GOT_SYMBOLS=' OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0; _gp = ALIGN(16) + 0x7ff0;
' '
OTHER_SDATA_SECTIONS=' OTHER_SDATA_SECTIONS="
.lit8 : { *(.lit8) } .lit8 ${RELOCATING-0} : { *(.lit8) }
.lit4 : { *(.lit4) } .lit4 ${RELOCATING-0} : { *(.lit4) }
.srdata : { *(.srdata) } .srdata ${RELOCATING-0} : { *(.srdata) }
' "
# Magic symbols. # Magic symbols.
TEXT_START_SYMBOLS='_ftext = . ;' TEXT_START_SYMBOLS='_ftext = . ;'
@ -41,35 +44,28 @@ EXECUTABLE_SYMBOLS="
# segment. # segment.
WRITABLE_RODATA= WRITABLE_RODATA=
OTHER_RELOCATING_SECTIONS=' OTHER_SECTIONS="
.MIPS.events.text : .MIPS.events.text ${RELOCATING-0} :
{ {
*(.MIPS.events.text) *(.MIPS.events.text${RELOCATING+ .MIPS.events.gnu.linkonce.t*})
*(.MIPS.events.gnu.linkonce.t*)
} }
.MIPS.content.text : .MIPS.content.text ${RELOCATING-0} :
{ {
*(.MIPS.content.text) *(.MIPS.content.text${RELOCATING+ .MIPS.content.gnu.linkonce.t*})
*(.MIPS.content.gnu.linkonce.t*)
} }
.MIPS.events.data : .MIPS.events.data ${RELOCATING-0} :
{ {
*(.MIPS.events.data) *(.MIPS.events.data${RELOCATING+ .MIPS.events.gnu.linkonce.d*})
*(.MIPS.events.gnu.linkonce.d*)
} }
.MIPS.content.data : .MIPS.content.data ${RELOCATING-0} :
{ {
*(.MIPS.content.data) *(.MIPS.content.data${RELOCATING+ .MIPS.content.gnu.linkonce.d*})
*(.MIPS.content.gnu.linkonce.d*)
} }
.MIPS.events.rodata : .MIPS.events.rodata ${RELOCATING-0} :
{ {
*(.MIPS.events.rodata) *(.MIPS.events.rodata${RELOCATING+ .MIPS.events.gnu.linkonce.r*})
*(.MIPS.events.gnu.linkonce.r*)
} }
.MIPS.content.rodata : .MIPS.content.rodata ${RELOCATING-0} :
{ {
*(.MIPS.content.rodata) *(.MIPS.content.rodata${RELOCATING+ .MIPS.content.gnu.linkonce.r*})
*(.MIPS.content.gnu.linkonce.r*) }"
}
'

View file

@ -1,31 +1,2 @@
SCRIPT_NAME=elf . ${srcdir}/emulparams/elf32bmip.sh
OUTPUT_FORMAT="elf32-bigmips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
TEXT_DYNAMIC=
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
ENTRY=__start ENTRY=__start

View file

@ -1,31 +1,9 @@
SCRIPT_NAME=elf # If you change this file, please also look at files which source this one:
# elf32ltsmip.sh
. ${srcdir}/emulparams/elf32bmip.sh
OUTPUT_FORMAT="elf32-tradbigmips" OUTPUT_FORMAT="elf32-tradbigmips"
BIG_OUTPUT_FORMAT="elf32-tradbigmips" BIG_OUTPUT_FORMAT="elf32-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips" LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips"
TEXT_START_ADDR=0x0400000
DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x0 SHLIB_TEXT_START_ADDR=0x0
TEXT_DYNAMIC=
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
ENTRY=__start ENTRY=__start

View file

@ -1,28 +1,2 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-bigmips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
EMBEDDED=yes EMBEDDED=yes
. ${srcdir}/emulparams/elf32bmip.sh

View file

@ -1,28 +1,2 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
EMBEDDED=yes EMBEDDED=yes
. ${srcdir}/emulparams/elf32lmip.sh

View file

@ -7,4 +7,4 @@ MAXPAGESIZE=256
ENTRY=_start ENTRY=_start
EMBEDDED=yes EMBEDDED=yes
NOP=0x9fa09fa0 NOP=0x9fa09fa0
OTHER_RELOCATING_SECTIONS='PROVIDE (__stack = 0x200000);' OTHER_END_SYMBOLS='PROVIDE (__stack = 0x200000);'

View file

@ -1,29 +1,4 @@
SCRIPT_NAME=elf . ${srcdir}/emulparams/elf32b4300.sh
OUTPUT_FORMAT="elf32-littlemips" OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips" BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips" LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0xa0020000
MAXPAGESIZE=0x40000
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
DYNAMIC_LINK=false
EMBEDDED=yes

View file

@ -1,30 +1,7 @@
SCRIPT_NAME=elf # If you change this file, please also look at files which source this one:
# elf32elmip.sh elf32lsmip.sh
. ${srcdir}/emulparams/elf32bmip.sh
OUTPUT_FORMAT="elf32-littlemips" OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips" BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips" LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
TEXT_DYNAMIC=
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes

View file

@ -1,18 +1,5 @@
TEMPLATE_NAME=elf32 # If you change this file, please also look at files which source this one:
# If you change this, please also look at: # elf32lppcsim.sh
# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes . ${srcdir}/emulparams/elf32ppc.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpcle" OUTPUT_FORMAT="elf32-powerpcle"
TEXT_START_ADDR=0x01800000
MAXPAGESIZE=0x10000
ARCH=powerpc
MACHINE=
BSS_PLT=
EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
OTHER_BSS_END_SYMBOLS='__end = .;'
OTHER_READWRITE_SECTIONS='
.fixup : { *(.fixup) }
.got1 : { *(.got1) }
.got2 : { *(.got2) }
'

View file

@ -1,18 +1,2 @@
TEMPLATE_NAME=elf32 . ${srcdir}/emulparams/elf32lppc.sh
# If you change this, please also look at:
# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpcle"
TEXT_START_ADDR=0x10000000 TEXT_START_ADDR=0x10000000
MAXPAGESIZE=0x10000
ARCH=powerpc
MACHINE=
BSS_PLT=
EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
OTHER_BSS_END_SYMBOLS='__end = .;'
OTHER_READWRITE_SECTIONS='
.fixup : { *(.fixup) }
.got1 : { *(.got1) }
.got2 : { *(.got2) }
'

View file

@ -1,31 +1,2 @@
SCRIPT_NAME=elf . ${srcdir}/emulparams/elf32lmip.sh
OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
TEXT_DYNAMIC=
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
ENTRY=__start ENTRY=__start

View file

@ -1,31 +1,2 @@
SCRIPT_NAME=elf . ${srcdir}/emulparams/elf32btsmip.sh
OUTPUT_FORMAT="elf32-tradlittlemips" OUTPUT_FORMAT="elf32-tradlittlemips"
BIG_OUTPUT_FORMAT="elf32-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips"
TEXT_START_ADDR=0x0400000
DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x0
TEXT_DYNAMIC=
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
ENTRY=__start

View file

@ -24,9 +24,8 @@ NOP=0x0e0e0e0e
OTHER_BSS_SYMBOLS="__bss_start__ = . ;" OTHER_BSS_SYMBOLS="__bss_start__ = . ;"
OTHER_BSS_END_SYMBOLS="__bss_end__ = . ;" OTHER_BSS_END_SYMBOLS="__bss_end__ = . ;"
# Hmmm, there's got to be a better way. This sets the stack to the # This sets the stack to the top of the simulator memory (2^19 bytes).
# top of the simulator memory (2^19 bytes). STACK_ADDR=0x80000
OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
TEMPLATE_NAME=elf32 TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes GENERATE_SHLIB_SCRIPT=yes

View file

@ -1,6 +1,7 @@
# If you change this file, please also look at files which source this one:
# elf32lppc.sh elf32ppclinux.sh elf32ppcsim.sh
TEMPLATE_NAME=elf32 TEMPLATE_NAME=elf32
# If you change this, please also look at:
# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes GENERATE_SHLIB_SCRIPT=yes
SCRIPT_NAME=elf SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpc" OUTPUT_FORMAT="elf32-powerpc"
@ -11,8 +12,8 @@ MACHINE=
BSS_PLT= BSS_PLT=
EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
OTHER_BSS_END_SYMBOLS='__end = .;' OTHER_BSS_END_SYMBOLS='__end = .;'
OTHER_READWRITE_SECTIONS=' OTHER_READWRITE_SECTIONS="
.fixup : { *(.fixup) } .fixup ${RELOCATING-0} : { *(.fixup) }
.got1 : { *(.got1) } .got1 ${RELOCATING-0} : { *(.got1) }
.got2 : { *(.got2) } .got2 ${RELOCATING-0} : { *(.got2) }
' "

View file

@ -1,18 +1,8 @@
TEMPLATE_NAME=elf32 . ${srcdir}/emulparams/elf32ppc.sh
# If you change this, please also look at:
# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpc"
TEXT_START_ADDR=0x10000000 TEXT_START_ADDR=0x10000000
MAXPAGESIZE=0x10000 unset EXECUTABLE_SYMBOLS
ARCH=powerpc unset OTHER_BSS_END_SYMBOLS
MACHINE= test -z "${RELOCATING}" || OTHER_SECTIONS="/DISCARD/ : { *(.fixup) }"
BSS_PLT= OTHER_READWRITE_SECTIONS="
OTHER_RELOCATING_SECTIONS=' .got1 ${RELOCATING-0} : { *(.got1) }
/DISCARD/ : { *(.fixup) } .got2 ${RELOCATING-0} : { *(.got2) }"
'
OTHER_READWRITE_SECTIONS='
.got1 : { *(.got1) }
.got2 : { *(.got2) }
'

View file

@ -1,18 +1,2 @@
TEMPLATE_NAME=elf32 . ${srcdir}/emulparams/elf32ppc.sh
# If you change this, please also look at:
# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpc"
TEXT_START_ADDR=0x10000000 TEXT_START_ADDR=0x10000000
MAXPAGESIZE=0x10000
ARCH=powerpc
MACHINE=
BSS_PLT=
EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
OTHER_BSS_END_SYMBOLS='__end = .;'
OTHER_READWRITE_SECTIONS='
.fixup : { *(.fixup) }
.got1 : { *(.got1) }
.got2 : { *(.got2) }
'

View file

@ -10,7 +10,12 @@ TEXT_START_ADDR="0x10000000"
DATA_ADDR="0x20000000 + (. & (${MAXPAGESIZE} - 1))" DATA_ADDR="0x20000000 + (. & (${MAXPAGESIZE} - 1))"
GENERATE_SHLIB_SCRIPT=yes GENERATE_SHLIB_SCRIPT=yes
NOP=0x00300000010070000002000001000400 # a bundle full of nops NOP=0x00300000010070000002000001000400 # a bundle full of nops
OTHER_GOT_SECTIONS='.IA_64.pltoff : { *(.IA_64.pltoff) }' OTHER_GOT_SECTIONS="
OTHER_PLT_RELOC_SECTIONS='.rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) }' .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }"
OTHER_READONLY_SECTIONS='.opd : { *(.opd) } .IA_64.unwind_info : { *(.IA_64.unwind_info*) *(.gnu.linkonce.ia64unwi.*) } .IA_64.unwind : { *(.IA_64.unwind*) *(.gnu.linkonce.ia64unw.*) }' OTHER_PLT_RELOC_SECTIONS="
.rela.IA_64.pltoff ${RELOCATING-0} : { *(.rela.IA_64.pltoff) }"
OTHER_READONLY_SECTIONS="
.opd ${RELOCATING-0} : { *(.opd) }
.IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info*${RELOCATING+ .gnu.linkonce.ia64unwi.*}) }
.IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind*${RELOCATING+ .gnu.linkonce.ia64unw.*}) }"
LIB_PATH=/usr/lib/ia64l64:/usr/lib:/usr/local/lib LIB_PATH=/usr/lib/ia64l64:/usr/lib:/usr/local/lib

View file

@ -11,6 +11,11 @@ TEXT_START_ADDR="0x4000000000000000"
DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))" DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))"
GENERATE_SHLIB_SCRIPT=yes GENERATE_SHLIB_SCRIPT=yes
NOP=0x00300000010070000002000001000400 # a bundle full of nops NOP=0x00300000010070000002000001000400 # a bundle full of nops
OTHER_GOT_SECTIONS='.IA_64.pltoff : { *(.IA_64.pltoff) }' OTHER_GOT_SECTIONS="
OTHER_PLT_RELOC_SECTIONS='.rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) }' .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }"
OTHER_READONLY_SECTIONS='.opd : { *(.opd) } .IA_64.unwind_info : { *(.IA_64.unwind_info*) *(.gnu.linkonce.ia64unwi.*) } .IA_64.unwind : { *(.IA_64.unwind*) *(.gnu.linkonce.ia64unw.*) }' OTHER_PLT_RELOC_SECTIONS="
.rela.IA_64.pltoff ${RELOCATING-0} : { *(.rela.IA_64.pltoff) }"
OTHER_READONLY_SECTIONS="
.opd ${RELOCATING-0} : { *(.opd) }
.IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info*${RELOCATING+ .gnu.linkonce.ia64unwi.*}) }
.IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind*${RELOCATING+ .gnu.linkonce.ia64unw.*}) }"

View file

@ -12,7 +12,8 @@ GENERATE_SHLIB_SCRIPT=yes
DATA_PLT= DATA_PLT=
NOP=0x47ff041f NOP=0x47ff041f
OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }' OTHER_READONLY_SECTIONS="
.reginfo ${RELOCATING-0} : { *(.reginfo) }"
# This code gets inserted into the generic elf32.sc linker script # This code gets inserted into the generic elf32.sc linker script
# and allows us to define our own command line switches. # and allows us to define our own command line switches.

View file

@ -1,79 +1,12 @@
# This is an ELF platform. . ${srcdir}/emulparams/elf32bmipn32.sh
SCRIPT_NAME=elf
# Handle both big- and little-ended 32-bit MIPS objects.
ARCH=mips
OUTPUT_FORMAT="elf64-bigmips" OUTPUT_FORMAT="elf64-bigmips"
BIG_OUTPUT_FORMAT="elf64-bigmips" BIG_OUTPUT_FORMAT="elf64-bigmips"
LITTLE_OUTPUT_FORMAT="elf64-littlemips" LITTLE_OUTPUT_FORMAT="elf64-littlemips"
# Note that the elf32 template is used for 64-bit emulations as well
# as 32-bit emulations.
ELFSIZE=64 ELFSIZE=64
TEMPLATE_NAME=elf32
TEXT_START_ADDR=0x10000000
MAXPAGESIZE=0x100000
ENTRY=__start
# GOT-related settings.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
.srdata : { *(.srdata) }
'
# Magic symbols.
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
# IRIX6 defines these symbols. 0x40 is the size of the ELF header. # IRIX6 defines these symbols. 0x40 is the size of the ELF header.
EXECUTABLE_SYMBOLS=" EXECUTABLE_SYMBOLS="
__dso_displacement = 0; __dso_displacement = 0;
__elf_header = ${TEXT_START_ADDR}; __elf_header = ${TEXT_START_ADDR};
__program_header_table = ${TEXT_START_ADDR} + 0x40; __program_header_table = ${TEXT_START_ADDR} + 0x40;
" "
# There are often dynamic relocations against the .rodata section.
# Setting DT_TEXTREL in the .dynamic section does not convince the
# IRIX6 linker to permit relocations against the text segment.
# Following the IRIX linker, we simply put .rodata in the data
# segment.
WRITABLE_RODATA=
OTHER_RELOCATING_SECTIONS='
.MIPS.events.text :
{
*(.MIPS.events.text)
*(.MIPS.events.gnu.linkonce.t*)
}
.MIPS.content.text :
{
*(.MIPS.content.text)
*(.MIPS.content.gnu.linkonce.t*)
}
.MIPS.events.data :
{
*(.MIPS.events.data)
*(.MIPS.events.gnu.linkonce.d*)
}
.MIPS.content.data :
{
*(.MIPS.content.data)
*(.MIPS.content.gnu.linkonce.d*)
}
.MIPS.events.rodata :
{
*(.MIPS.events.rodata)
*(.MIPS.events.gnu.linkonce.r*)
}
.MIPS.content.rodata :
{
*(.MIPS.content.rodata)
*(.MIPS.content.gnu.linkonce.r*)
}
'

View file

@ -1,39 +1,20 @@
# This is an ELF platform. # If you change this file, please also look at files which source this one:
SCRIPT_NAME=elf # elf64ltsmip.sh
# Handle both big- and little-ended 64-bit MIPS objects. . ${srcdir}/emulparams/elf32bmipn32.sh
ARCH=mips
OUTPUT_FORMAT="elf64-tradbigmips" OUTPUT_FORMAT="elf64-tradbigmips"
BIG_OUTPUT_FORMAT="elf64-tradbigmips" BIG_OUTPUT_FORMAT="elf64-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips" LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
# Note that the elf32 template is used for 64-bit emulations as well
# as 32-bit emulations.
ELFSIZE=64 ELFSIZE=64
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
TEXT_START_ADDR=0x10000000 GENERATE_SHLIB_SCRIPT=yes
DATA_ADDR=0x0400000000 DATA_ADDR=0x0400000000
MAXPAGESIZE=0x100000
NONPAGED_TEXT_START_ADDR=0x10000000 NONPAGED_TEXT_START_ADDR=0x10000000
SHLIB_TEXT_START_ADDR=0x0 SHLIB_TEXT_START_ADDR=0x0
TEXT_DYNAMIC= TEXT_DYNAMIC=
ENTRY=__start
# GOT-related settings. unset EXECUTABLE_SYMBOLS
OTHER_GOT_SYMBOLS=' unset WRITABLE_RODATA
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
# Magic symbols.
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
# Magic sections. # Magic sections.
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }' INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'

View file

@ -1,9 +1,10 @@
SCRIPT_NAME=elf . ${srcdir}/emulparams/hppa64linux.sh
ELFSIZE=64
OUTPUT_FORMAT="elf64-hppa" OUTPUT_FORMAT="elf64-hppa"
LIB_PATH=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64 LIB_PATH=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64
TEXT_START_ADDR=0x4000000000001000 TEXT_START_ADDR=0x4000000000001000
DATA_ADDR=0x8000000000001000 DATA_ADDR=0x8000000000001000
TARGET_PAGE_SIZE=4096
MAXPAGESIZE=4096
# The HP dynamic linker actually requires you set the start of text and # The HP dynamic linker actually requires you set the start of text and
# data to some reasonable value. Of course nobody knows what reasoanble # data to some reasonable value. Of course nobody knows what reasoanble
@ -11,43 +12,8 @@ DATA_ADDR=0x8000000000001000
SHLIB_TEXT_START_ADDR=0x4000000000001000 SHLIB_TEXT_START_ADDR=0x4000000000001000
SHLIB_DATA_ADDR=0x8000000000001000 SHLIB_DATA_ADDR=0x8000000000001000
TARGET_PAGE_SIZE=4096
MAXPAGESIZE=4096
ARCH=hppa
MACHINE=hppa2.0w
ENTRY="main"
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
# We really want multiple .stub sections, one for each input .text section,
# but for now this is good enough.
OTHER_READONLY_SECTIONS='.PARISC.unwind : { *(.PARISC.unwind) } '
# The PA64 ELF port treats .plt sections differently than most. We also have
# to create a .opd section. What most systems call the .got, we call the .dlt
OTHER_READWRITE_SECTIONS='.opd : { *(.opd) } PROVIDE (__gp = .); .plt : { *(.plt) } .dlt : { *(.dlt) }'
# The PA64 ELF port has two additional bss sections. huge bss and thread bss.
# Make sure they end up in the appropriate location. We also have to set
# __TLS_SIZE to the size of the thread bss section.
OTHER_BSS_SECTIONS='.hbss : { *(.hbss) } .tbss : { *(.tbss) }'
#OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));'
OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = 0); PROVIDE(__TLS_INIT_SIZE = 0); PROVIDE(__TLS_INIT_START = 0); PROVIDE(__TLS_INIT_A = 0); PROVIDE(__TLS_PREALLOC_DTV_A = 0);'
# HPs use .dlt where systems use .got. Sigh.
OTHER_GOT_RELOC_SECTIONS='.rela.dlt : { *(.rela.dlt) }'
# We're not actually providing a symbol anymore (due to the inability to be
# safe in regards to shared libraries). So we just allocate the hunk of space
# unconditionally, but do not mess around with the symbol table.
DATA_START_SYMBOLS='. += 16;'
# The linker is required to define these two symbols. # The linker is required to define these two symbols.
EXECUTABLE_SYMBOLS='PROVIDE (__SYSTEM_ID = 0x214); PROVIDE (_FPU_STATUS = 0x0);' EXECUTABLE_SYMBOLS='PROVIDE (__SYSTEM_ID = 0x214); PROVIDE (_FPU_STATUS = 0x0);'
DATA_PLT=
# .dynamic should be at the start of the .text segment.
TEXT_DYNAMIC=
# The PA64 ELF port needs two additional initializer sections and also wants # The PA64 ELF port needs two additional initializer sections and also wants
# a start/end symbol pair for the .init and .fini sections. # a start/end symbol pair for the .init and .fini sections.
INIT_START='KEEP (*(.HP.init)); PROVIDE (__preinit_start = .); KEEP (*(.preinit)); PROVIDE (__preinit_end = .); PROVIDE (__init_start = .);' INIT_START='KEEP (*(.HP.init)); PROVIDE (__preinit_start = .); KEEP (*(.preinit)); PROVIDE (__preinit_end = .); PROVIDE (__init_start = .);'

View file

@ -1,44 +1,4 @@
# This is an ELF platform. . ${srcdir}/emulparams/elf64btsmip.sh
SCRIPT_NAME=elf
# Handle both big- and little-ended 64-bit MIPS objects.
ARCH=mips
OUTPUT_FORMAT="elf64-tradlittlemips" OUTPUT_FORMAT="elf64-tradlittlemips"
BIG_OUTPUT_FORMAT="elf64-tradbigmips" BIG_OUTPUT_FORMAT="elf64-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips" LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
# Note that the elf32 template is used for 64-bit emulations as well
# as 32-bit emulations.
ELFSIZE=64
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
TEXT_START_ADDR=0x10000000
DATA_ADDR=0x0400000000
MAXPAGESIZE=0x100000
NONPAGED_TEXT_START_ADDR=0x10000000
SHLIB_TEXT_START_ADDR=0x0
TEXT_DYNAMIC=
ENTRY=__start
# GOT-related settings.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
# Magic symbols.
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
# Magic sections.
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
'

View file

@ -44,17 +44,17 @@ OTHER_TEXT_SECTIONS='
PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.)); PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.));
' '
OTHER_RELOCATING_SECTIONS=' OTHER_SECTIONS="
.MMIX.reg_contents : .MMIX.reg_contents :
{ {
/* Note that this section always has a fixed VMA - that of its /* Note that this section always has a fixed VMA - that of its
first register * 8. */ first register * 8. */
*(.MMIX.reg_contents); *(.MMIX.reg_contents);
} }
' "
# FIXME: Also bit by the PROVIDE bug? If not, this could be # FIXME: Also bit by the PROVIDE bug? If not, this could be
# EXECUTABLE_SYMBOLS. # EXECUTABLE_SYMBOLS.
# By default, put the high end of the stack where the register stack # By default, put the high end of the stack where the register stack
# begins. They grow in opposite directions. */ # begins. They grow in opposite directions. */
OTHER_SECTIONS='PROVIDE (__Stack_start = 0x6000000000000000);' OTHER_END_SYMBOLS="PROVIDE (__Stack_start = 0x6000000000000000);"

View file

@ -1,3 +1,6 @@
# If you change this file, please also look at files which source this one:
# h8300helf.sh h8300self.sh
SCRIPT_NAME=elf SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-h8300" OUTPUT_FORMAT="elf32-h8300"
TEXT_START_ADDR=0x100 TEXT_START_ADDR=0x100
@ -6,7 +9,4 @@ TARGET_PAGE_SIZE=128
ARCH=h8300 ARCH=h8300
TEMPLATE_NAME=elf32 TEMPLATE_NAME=elf32
EMBEDDED=yes EMBEDDED=yes
STACK_ADDR=0xfefc
OTHER_RELOCATING_SECTIONS='
.stack 0xfefc : { _stack = .; *(.stack) }
'

View file

@ -1,12 +1,3 @@
SCRIPT_NAME=elf . ${srcdir}/emulparams/h8300elf.sh
OUTPUT_FORMAT="elf32-h8300"
TEXT_START_ADDR=0x100
MAXPAGESIZE=2
TARGET_PAGE_SIZE=128
ARCH="h8300:h8300h" ARCH="h8300:h8300h"
TEMPLATE_NAME=elf32 STACK_ADDR=0x2fefc
EMBEDDED=yes
OTHER_RELOCATING_SECTIONS='
.stack 0x2fefc : { _stack = .; *(.stack) }
'

View file

@ -1,12 +1,3 @@
SCRIPT_NAME=elf . ${srcdir}/emulparams/h8300elf.sh
OUTPUT_FORMAT="elf32-h8300"
TEXT_START_ADDR=0x100
MAXPAGESIZE=2
TARGET_PAGE_SIZE=128
ARCH="h8300:h8300s" ARCH="h8300:h8300s"
TEMPLATE_NAME=elf32 STACK_ADDR=0x2fefc
EMBEDDED=yes
OTHER_RELOCATING_SECTIONS='
.stack 0x2fefc : { _stack = .; *(.stack) }
'

View file

@ -1,3 +1,6 @@
# If you change this file, please also look at files which source this one:
# elf64hppa.sh
SCRIPT_NAME=elf SCRIPT_NAME=elf
ELFSIZE=64 ELFSIZE=64
OUTPUT_FORMAT="elf64-hppa-linux" OUTPUT_FORMAT="elf64-hppa-linux"
@ -12,18 +15,31 @@ GENERATE_SHLIB_SCRIPT=yes
# We really want multiple .stub sections, one for each input .text section, # We really want multiple .stub sections, one for each input .text section,
# but for now this is good enough. # but for now this is good enough.
OTHER_READONLY_SECTIONS='.PARISC.unwind : { *(.PARISC.unwind) } ' OTHER_READONLY_SECTIONS="
.PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }"
# The PA64 ELF port treats .plt sections differently than most. We also have # The PA64 ELF port treats .plt sections differently than most. We also have
# to create a .opd section. What most systems call the .got, we call the .dlt # to create a .opd section. What most systems call the .got, we call the .dlt
OTHER_READWRITE_SECTIONS='.opd : { *(.opd) } PROVIDE (__gp = .); .plt : { *(.plt) } .dlt : { *(.dlt) }' OTHER_READWRITE_SECTIONS="
.opd ${RELOCATING-0} : { *(.opd) }
${RELOCATING+PROVIDE (__gp = .);}
.plt ${RELOCATING-0} : { *(.plt) }
.dlt ${RELOCATING-0} : { *(.dlt) }"
# The PA64 ELF port has two additional bss sections. huge bss and thread bss. # The PA64 ELF port has two additional bss sections. huge bss and thread bss.
# Make sure they end up in the appropriate location. We also have to set # Make sure they end up in the appropriate location. We also have to set
# __TLS_SIZE to the size of the thread bss section. # __TLS_SIZE to the size of the thread bss section.
OTHER_BSS_SECTIONS='.hbss : { *(.hbss) } .tbss : { *(.tbss) }' OTHER_BSS_SECTIONS="
.hbss ${RELOCATING-0} : { *(.hbss) }
.tbss ${RELOCATING-0} : { *(.tbss) }
"
#OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));' #OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));'
OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = 0);' OTHER_BSS_END_SYMBOLS='
PROVIDE (__TLS_SIZE = 0);
PROVIDE (__TLS_INIT_SIZE = 0);
PROVIDE (__TLS_INIT_START = 0);
PROVIDE (__TLS_INIT_A = 0);
PROVIDE (__TLS_PREALLOC_DTV_A = 0);'
# HPs use .dlt where systems use .got. Sigh. # HPs use .dlt where systems use .got. Sigh.
OTHER_GOT_RELOC_SECTIONS='.rela.dlt : { *(.rela.dlt) }' OTHER_GOT_RELOC_SECTIONS='.rela.dlt : { *(.rela.dlt) }'

View file

@ -8,7 +8,8 @@ ARCH=hppa
MACHINE=hppa1.1 # We use 1.1 specific features. MACHINE=hppa1.1 # We use 1.1 specific features.
NOP=0x08000240 NOP=0x08000240
START="_start" START="_start"
OTHER_READONLY_SECTIONS='.PARISC.unwind : { *(.PARISC.unwind) } ' OTHER_READONLY_SECTIONS="
.PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }"
DATA_START_SYMBOLS='PROVIDE ($global$ = .);' DATA_START_SYMBOLS='PROVIDE ($global$ = .);'
DATA_PLT= DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes GENERATE_SHLIB_SCRIPT=yes

View file

@ -8,6 +8,5 @@ MACHINE=
MAXPAGESIZE=32 MAXPAGESIZE=32
EMBEDDED=yes EMBEDDED=yes
# Hmmm, there's got to be a better way. This sets the stack to the # This sets the stack to the top of simulator memory (8MB).
# top of simulator memory (8MB). OTHER_END_SYMBOLS='PROVIDE (_stack = 0x800000);'
OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = 0x800000);'

View file

@ -1,4 +1,6 @@
MACHINE= # If you change this file, please also look at files which source this one:
# mn10300.sh
SCRIPT_NAME=elf SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-mn10200" OUTPUT_FORMAT="elf32-mn10200"
TEXT_START_ADDR=0x0 TEXT_START_ADDR=0x0
@ -8,9 +10,8 @@ MAXPAGESIZE=1
ENTRY=_start ENTRY=_start
EMBEDDED=yes EMBEDDED=yes
# Hmmm, there's got to be a better way. This sets the stack to the # This sets the stack to the top of the simulator memory (2^19 bytes).
# top of the simulator memory (2^19 bytes). STACK_ADDR=0x80000
OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
# These are for compatibility with the COFF toolchain. # These are for compatibility with the COFF toolchain.
# XXX These should definitely disappear. # XXX These should definitely disappear.

View file

@ -1,20 +1,3 @@
MACHINE= . ${srcdir}/emulparams/mn10200.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-mn10300" OUTPUT_FORMAT="elf32-mn10300"
TEXT_START_ADDR=0x0
ARCH=mn10300 ARCH=mn10300
MACHINE=
MAXPAGESIZE=1
ENTRY=_start
EMBEDDED=yes
# Hmmm, there's got to be a better way. This sets the stack to the
# top of the simulator memory (2^19 bytes).
OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
# These are for compatibility with the COFF toolchain.
# XXX These should definitely disappear.
CTOR_START='___ctors = .;'
CTOR_END='___ctors_end = .;'
DTOR_START='___dtors = .;'
DTOR_END='___dtors_end = .;'

View file

@ -1,3 +1,6 @@
# If you change this file, please also look at files which source this one:
# shl.sh
SCRIPT_NAME=sh SCRIPT_NAME=sh
OUTPUT_FORMAT="coff-sh" OUTPUT_FORMAT="coff-sh"
TEXT_START_ADDR=0x8000 TEXT_START_ADDR=0x8000

View file

@ -1,3 +1,6 @@
# If you change this file, please also look at files which source this one:
# shlelf.sh
SCRIPT_NAME=elf SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-sh" OUTPUT_FORMAT="elf32-sh"
TEXT_START_ADDR=0x1000 TEXT_START_ADDR=0x1000
@ -14,4 +17,4 @@ CTOR_START='___ctors = .;'
CTOR_END='___ctors_end = .;' CTOR_END='___ctors_end = .;'
DTOR_START='___dtors = .;' DTOR_START='___dtors = .;'
DTOR_END='___dtors_end = .;' DTOR_END='___dtors_end = .;'
OTHER_RELOCATING_SECTIONS='.stack 0x30000 : { _stack = .; *(.stack) }' STACK_ADDR=0x30000

View file

@ -1,14 +1,2 @@
SCRIPT_NAME=elf . ${srcdir}/emulparams/shlelf_linux.sh
OUTPUT_FORMAT="elf32-shbig-linux" OUTPUT_FORMAT="elf32-shbig-linux"
TEXT_START_ADDR=0x400000
MAXPAGESIZE=0x10000
ARCH=sh
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
DATA_START_SYMBOLS='__data_start = . ;';
OTHER_READWRITE_SECTIONS='
.note.ABI-tag : { *(.note.ABI-tag) }
'

View file

@ -1,5 +1,2 @@
SCRIPT_NAME=sh . ${srcdir}/emulparams/sh.sh
OUTPUT_FORMAT="coff-shl" OUTPUT_FORMAT="coff-shl"
TEXT_START_ADDR=0x8000
TARGET_PAGE_SIZE=128
ARCH=sh

View file

@ -1,17 +1,2 @@
SCRIPT_NAME=elf . ${srcdir}/emulparams/shelf.sh
OUTPUT_FORMAT="elf32-shl" OUTPUT_FORMAT="elf32-shl"
TEXT_START_ADDR=0x1000
MAXPAGESIZE=128
ARCH=sh
MACHINE=
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
EMBEDDED=yes
# These are for compatibility with the COFF toolchain.
ENTRY=start
CTOR_START='___ctors = .;'
CTOR_END='___ctors_end = .;'
DTOR_START='___dtors = .;'
DTOR_END='___dtors_end = .;'
OTHER_RELOCATING_SECTIONS='.stack 0x30000 : { _stack = .; *(.stack) }'

View file

@ -1,3 +1,6 @@
# If you change this file, please also look at files which source this one:
# shelf_linux.sh
SCRIPT_NAME=elf SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-sh-linux" OUTPUT_FORMAT="elf32-sh-linux"
TEXT_START_ADDR=0x400000 TEXT_START_ADDR=0x400000
@ -9,6 +12,5 @@ GENERATE_SHLIB_SCRIPT=yes
DATA_START_SYMBOLS='__data_start = . ;'; DATA_START_SYMBOLS='__data_start = . ;';
OTHER_READWRITE_SECTIONS=' OTHER_READWRITE_SECTIONS="
.note.ABI-tag : { *(.note.ABI-tag) } .note.ABI-tag ${RELOCATING-0} : { *(.note.ABI-tag) }"
'

View file

@ -33,6 +33,8 @@
# combination of .init sections. # combination of .init sections.
# FINI_START, FINI_END - statements just before and just after # FINI_START, FINI_END - statements just before and just after
# combination of .fini sections. # combination of .fini sections.
# STACK_ADDR - start of a .stack section.
# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
# #
# 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.
@ -55,6 +57,7 @@
# .sbss .gnu.linkonce.sb.foo # .sbss .gnu.linkonce.sb.foo
# .sdata2 .gnu.linkonce.s2.foo # .sdata2 .gnu.linkonce.s2.foo
# .sbss2 .gnu.linkonce.sb2.foo # .sbss2 .gnu.linkonce.sb2.foo
# .debug_info .gnu.linkonce.wi.foo
# #
# Each of these can also have corresponding .rel.* and .rela.* sections. # Each of these can also have corresponding .rel.* and .rela.* sections.
@ -68,9 +71,9 @@ 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) }"
DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }" RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }" SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }" SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
CTOR=".ctors ${CONSTRUCTING-0} : CTOR=".ctors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${CTOR_START}} ${CONSTRUCTING+${CTOR_START}}
@ -96,8 +99,7 @@ CTOR=".ctors ${CONSTRUCTING-0} :
KEEP (*(.ctors)) KEEP (*(.ctors))
${CONSTRUCTING+${CTOR_END}} ${CONSTRUCTING+${CTOR_END}}
}" }"
DTOR=".dtors ${CONSTRUCTING-0} :
DTOR=" .dtors ${CONSTRUCTING-0} :
{ {
${CONSTRUCTING+${DTOR_START}} ${CONSTRUCTING+${DTOR_START}}
KEEP (*crtbegin.o(.dtors)) KEEP (*crtbegin.o(.dtors))
@ -106,6 +108,11 @@ DTOR=" .dtors ${CONSTRUCTING-0} :
KEEP (*(.dtors)) KEEP (*(.dtors))
${CONSTRUCTING+${DTOR_END}} ${CONSTRUCTING+${DTOR_END}}
}" }"
STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
{
${RELOCATING+_stack = .;}
*(.stack)
}"
# if this is for an embedded system, don't add SIZEOF_HEADERS. # if this is for an embedded system, don't add SIZEOF_HEADERS.
if [ -z "$EMBEDDED" ]; then if [ -z "$EMBEDDED" ]; then
@ -142,8 +149,8 @@ SECTIONS
.dynsym ${RELOCATING-0} : { *(.dynsym) } .dynsym ${RELOCATING-0} : { *(.dynsym) }
.dynstr ${RELOCATING-0} : { *(.dynstr) } .dynstr ${RELOCATING-0} : { *(.dynstr) }
.gnu.version ${RELOCATING-0} : { *(.gnu.version) } .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
.gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) } .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
.gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) } .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
EOF EOF
if [ "x$COMBRELOC" = x ]; then if [ "x$COMBRELOC" = x ]; then
@ -154,45 +161,15 @@ fi
eval $COMBRELOCCAT <<EOF eval $COMBRELOCCAT <<EOF
.rel.init ${RELOCATING-0} : { *(.rel.init) } .rel.init ${RELOCATING-0} : { *(.rel.init) }
.rela.init ${RELOCATING-0} : { *(.rela.init) } .rela.init ${RELOCATING-0} : { *(.rela.init) }
.rel.text ${RELOCATING-0} : .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
{ .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
*(.rel.text)
${RELOCATING+*(.rel.text.*)}
${RELOCATING+*(.rel.gnu.linkonce.t.*)}
}
.rela.text ${RELOCATING-0} :
{
*(.rela.text)
${RELOCATING+*(.rela.text.*)}
${RELOCATING+*(.rela.gnu.linkonce.t.*)}
}
.rel.fini ${RELOCATING-0} : { *(.rel.fini) } .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
.rela.fini ${RELOCATING-0} : { *(.rela.fini) } .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
.rel.rodata ${RELOCATING-0} : .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
{ .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
*(.rel.rodata)
${RELOCATING+*(.rel.rodata.*)}
${RELOCATING+*(.rel.gnu.linkonce.r.*)}
}
.rela.rodata ${RELOCATING-0} :
{
*(.rela.rodata)
${RELOCATING+*(.rela.rodata.*)}
${RELOCATING+*(.rela.gnu.linkonce.r.*)}
}
${OTHER_READONLY_RELOC_SECTIONS} ${OTHER_READONLY_RELOC_SECTIONS}
.rel.data ${RELOCATING-0} : .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
{ .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
*(.rel.data)
${RELOCATING+*(.rel.data.*)}
${RELOCATING+*(.rel.gnu.linkonce.d.*)}
}
.rela.data ${RELOCATING-0} :
{
*(.rela.data)
${RELOCATING+*(.rela.data.*)}
${RELOCATING+*(.rela.gnu.linkonce.d.*)}
}
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) } .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
.rela.ctors ${RELOCATING-0} : { *(.rela.ctors) } .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
.rel.dtors ${RELOCATING-0} : { *(.rel.dtors) } .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
@ -200,76 +177,26 @@ eval $COMBRELOCCAT <<EOF
.rel.got ${RELOCATING-0} : { *(.rel.got) } .rel.got ${RELOCATING-0} : { *(.rel.got) }
.rela.got ${RELOCATING-0} : { *(.rela.got) } .rela.got ${RELOCATING-0} : { *(.rela.got) }
${OTHER_GOT_RELOC_SECTIONS} ${OTHER_GOT_RELOC_SECTIONS}
.rel.sdata ${RELOCATING-0} : .rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
{ .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }
*(.rel.sdata) .rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
${RELOCATING+*(.rel.sdata.*)} .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }
${RELOCATING+*(.rel.gnu.linkonce.s.*)} .rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
} .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }
.rela.sdata ${RELOCATING-0} : .rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
{ .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }
*(.rela.sdata) .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
${RELOCATING+*(.rela.sdata.*)} .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
${RELOCATING+*(.rela.gnu.linkonce.s.*)}
}
.rel.sbss ${RELOCATING-0} :
{
*(.rel.sbss)
${RELOCATING+*(.rel.sbss.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
}
.rela.sbss ${RELOCATING-0} :
{
*(.rela.sbss)
${RELOCATING+*(.rela.sbss.*)}
${RELOCATING+*(.rela.gnu.linkonce.sb.*)}
}
.rel.sdata2 ${RELOCATING-0} :
{
*(.rel.sdata2)
${RELOCATING+*(.rel.sdata2.*)}
${RELOCATING+*(.rel.gnu.linkonce.s2.*)}
}
.rela.sdata2 ${RELOCATING-0} :
{
*(.rela.sdata2)
${RELOCATING+*(.rela.sdata2.*)}
${RELOCATING+*(.rela.gnu.linkonce.s2.*)}
}
.rel.sbss2 ${RELOCATING-0} :
{
*(.rel.sbss2)
${RELOCATING+*(.rel.sbss2.*)}
${RELOCATING+*(.rel.gnu.linkonce.sb2.*)}
}
.rela.sbss2 ${RELOCATING-0} :
{
*(.rela.sbss2)
${RELOCATING+*(.rela.sbss2.*)}
${RELOCATING+*(.rela.gnu.linkonce.sb2.*)}
}
.rel.bss ${RELOCATING-0} :
{
*(.rel.bss)
${RELOCATING+*(.rel.bss.*)}
${RELOCATING+*(.rel.gnu.linkonce.b.*)}
}
.rela.bss ${RELOCATING-0} :
{
*(.rela.bss)
${RELOCATING+*(.rela.bss.*)}
${RELOCATING+*(.rela.gnu.linkonce.b.*)}
}
EOF EOF
if [ -n "$COMBRELOC" ]; then if [ -n "$COMBRELOC" ]; then
cat <<EOF cat <<EOF
.rel.dyn : .rel.dyn ${RELOCATING-0} :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF cat <<EOF
} }
.rela.dyn : .rela.dyn ${RELOCATING-0} :
{ {
EOF EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
@ -293,12 +220,9 @@ cat <<EOF
.text ${RELOCATING-0} : .text ${RELOCATING-0} :
{ {
${RELOCATING+${TEXT_START_SYMBOLS}} ${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text) *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
${RELOCATING+*(.text.*)}
*(.stub)
/* .gnu.warning sections are handled specially by elf32.em. */ /* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning) *(.gnu.warning)
${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+${OTHER_TEXT_SECTIONS}} ${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0} } =${NOP-0}
.fini ${RELOCATING-0} : .fini ${RELOCATING-0} :
@ -314,7 +238,7 @@ cat <<EOF
.rodata1 ${RELOCATING-0} : { *(.rodata1) } .rodata1 ${RELOCATING-0} : { *(.rodata1) }
${CREATE_SHLIB-${SDATA2}} ${CREATE_SHLIB-${SDATA2}}
${CREATE_SHLIB-${SBSS2}} ${CREATE_SHLIB-${SBSS2}}
${RELOCATING+${OTHER_READONLY_SECTIONS}} ${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. */
@ -324,24 +248,22 @@ cat <<EOF
.data ${RELOCATING-0} : .data ${RELOCATING-0} :
{ {
${RELOCATING+${DATA_START_SYMBOLS}} ${RELOCATING+${DATA_START_SYMBOLS}}
*(.data) *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
${RELOCATING+*(.data.*)}
${RELOCATING+*(.gnu.linkonce.d.*)}
${CONSTRUCTING+SORT(CONSTRUCTORS)} ${CONSTRUCTING+SORT(CONSTRUCTORS)}
} }
.data1 ${RELOCATING-0} : { *(.data1) } .data1 ${RELOCATING-0} : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) } .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) } .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) }
${WRITABLE_RODATA+${RODATA}} ${WRITABLE_RODATA+${RODATA}}
${RELOCATING+${OTHER_READWRITE_SECTIONS}} ${OTHER_READWRITE_SECTIONS}
${TEXT_DYNAMIC-${DYNAMIC}} ${TEXT_DYNAMIC-${DYNAMIC}}
${RELOCATING+${CTOR}} ${RELOCATING+${CTOR}}
${RELOCATING+${DTOR}} ${RELOCATING+${DTOR}}
.jcr : { KEEP (*(.jcr)) } .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
${DATA_PLT+${PLT}} ${DATA_PLT+${PLT}}
${RELOCATING+${OTHER_GOT_SYMBOLS}} ${RELOCATING+${OTHER_GOT_SYMBOLS}}
.got ${RELOCATING-0} : { *(.got.plt) *(.got) } .got ${RELOCATING-0} : { *(.got.plt) *(.got) }
${RELOCATING+${OTHER_GOT_SECTIONS}} ${OTHER_GOT_SECTIONS}
${CREATE_SHLIB+${SDATA2}} ${CREATE_SHLIB+${SDATA2}}
${CREATE_SHLIB+${SBSS2}} ${CREATE_SHLIB+${SBSS2}}
/* We want the small data sections together, so single-instruction offsets /* We want the small data sections together, so single-instruction offsets
@ -350,11 +272,9 @@ cat <<EOF
.sdata ${RELOCATING-0} : .sdata ${RELOCATING-0} :
{ {
${RELOCATING+${SDATA_START_SYMBOLS}} ${RELOCATING+${SDATA_START_SYMBOLS}}
*(.sdata) *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
${RELOCATING+*(.sdata.*)}
${RELOCATING+*(.gnu.linkonce.s.*)}
} }
${RELOCATING+${OTHER_SDATA_SECTIONS}} ${OTHER_SDATA_SECTIONS}
${RELOCATING+_edata = .;} ${RELOCATING+_edata = .;}
${RELOCATING+PROVIDE (edata = .);} ${RELOCATING+PROVIDE (edata = .);}
${RELOCATING+__bss_start = .;} ${RELOCATING+__bss_start = .;}
@ -364,9 +284,7 @@ cat <<EOF
${RELOCATING+PROVIDE (__sbss_start = .);} ${RELOCATING+PROVIDE (__sbss_start = .);}
${RELOCATING+PROVIDE (___sbss_start = .);} ${RELOCATING+PROVIDE (___sbss_start = .);}
*(.dynsbss) *(.dynsbss)
*(.sbss) *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
${RELOCATING+*(.sbss.*)}
${RELOCATING+*(.gnu.linkonce.sb.*)}
*(.scommon) *(.scommon)
${RELOCATING+PROVIDE (__sbss_end = .);} ${RELOCATING+PROVIDE (__sbss_end = .);}
${RELOCATING+PROVIDE (___sbss_end = .);} ${RELOCATING+PROVIDE (___sbss_end = .);}
@ -375,16 +293,14 @@ cat <<EOF
.bss ${RELOCATING-0} : .bss ${RELOCATING-0} :
{ {
*(.dynbss) *(.dynbss)
*(.bss) *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
${RELOCATING+*(.bss.*)}
${RELOCATING+*(.gnu.linkonce.b.*)}
*(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. */
${RELOCATING+. = ALIGN(${ALIGNMENT});} ${RELOCATING+. = ALIGN(${ALIGNMENT});}
} }
${RELOCATING+${OTHER_BSS_SECTIONS}} ${OTHER_BSS_SECTIONS}
${RELOCATING+. = ALIGN(${ALIGNMENT});} ${RELOCATING+. = ALIGN(${ALIGNMENT});}
${RELOCATING+_end = .;} ${RELOCATING+_end = .;}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}} ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
@ -417,7 +333,7 @@ cat <<EOF
.debug_pubnames 0 : { *(.debug_pubnames) } .debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */ /* DWARF 2 */
.debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) } .debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) } .debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) } .debug_frame 0 : { *(.debug_frame) }
@ -431,9 +347,8 @@ cat <<EOF
.debug_typenames 0 : { *(.debug_typenames) } .debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) } .debug_varnames 0 : { *(.debug_varnames) }
${RELOCATING+${OTHER_RELOCATING_SECTIONS}} ${STACK_ADDR+${STACK}}
/* These must appear regardless of ${RELOCATING}. */
${OTHER_SECTIONS} ${OTHER_SECTIONS}
${RELOCATING+${OTHER_END_SYMBOLS}}
} }
EOF EOF

View file

@ -92,7 +92,7 @@ SECTIONS
${RELOCATING+PROVIDE (etext = .);} ${RELOCATING+PROVIDE (etext = .);}
${CREATE_SHLIB-${SDATA2}} ${CREATE_SHLIB-${SDATA2}}
${CREATE_SHLIB-${SBSS2}} ${CREATE_SHLIB-${SBSS2}}
${RELOCATING+${OTHER_READONLY_SECTIONS}} ${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. It would the same address within the page on the next page up. It would
@ -118,7 +118,7 @@ SECTIONS
${CONSTRUCTING+CONSTRUCTORS} ${CONSTRUCTING+CONSTRUCTORS}
} }
.data1 ${RELOCATING-0} : { *(.data1) } .data1 ${RELOCATING-0} : { *(.data1) }
${RELOCATING+${OTHER_READWRITE_SECTIONS}} ${OTHER_READWRITE_SECTIONS}
.got1 ${RELOCATING-0} : { *(.got1) } .got1 ${RELOCATING-0} : { *(.got1) }
.dynamic ${RELOCATING-0} : { *(.dynamic) } .dynamic ${RELOCATING-0} : { *(.dynamic) }
@ -212,7 +212,6 @@ SECTIONS
.debug_typenames 0 : { *(.debug_typenames) } .debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) } .debug_varnames 0 : { *(.debug_varnames) }
/* These must appear regardless of ${RELOCATING}. */
${OTHER_SECTIONS} ${OTHER_SECTIONS}
} }
EOF EOF

View file

@ -87,7 +87,7 @@ SECTIONS
.dtors ${RELOCATING-0} : { *(.dtors) } .dtors ${RELOCATING-0} : { *(.dtors) }
.rodata ${RELOCATING-0} : { *(.rodata) } .rodata ${RELOCATING-0} : { *(.rodata) }
.rodata1 ${RELOCATING-0} : { *(.rodata1) } .rodata1 ${RELOCATING-0} : { *(.rodata1) }
${RELOCATING+${OTHER_READONLY_SECTIONS}} ${OTHER_READONLY_SECTIONS}
/* Read-write section, merged into data segment: */ /* Read-write section, merged into data segment: */
${RELOCATING+. = ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};} ${RELOCATING+. = ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};}
@ -98,7 +98,7 @@ SECTIONS
${CONSTRUCTING+CONSTRUCTORS} ${CONSTRUCTING+CONSTRUCTORS}
} }
.data1 ${RELOCATING-0} : { *(.data1) } .data1 ${RELOCATING-0} : { *(.data1) }
${RELOCATING+${OTHER_READWRITE_SECTIONS}} ${OTHER_READWRITE_SECTIONS}
.got ${RELOCATING-0} : { *(.got.plt) *(.got) } .got ${RELOCATING-0} : { *(.got.plt) *(.got) }
.dynamic ${RELOCATING-0} : { *(.dynamic) } .dynamic ${RELOCATING-0} : { *(.dynamic) }
${DATA_PLT+${PLT}} ${DATA_PLT+${PLT}}
@ -125,7 +125,6 @@ SECTIONS
.stab 0 : { *(.stab) } .stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) } .stabstr 0 : { *(.stabstr) }
/* These must appear regardless of ${RELOCATING}. */
${OTHER_SECTIONS} ${OTHER_SECTIONS}
} }
EOF EOF