aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog97
-rw-r--r--ld/Makefile.am27
-rw-r--r--ld/Makefile.in724
-rw-r--r--ld/emulparams/armelf.sh5
-rw-r--r--ld/emulparams/armelf_oabi.sh5
-rw-r--r--ld/emulparams/criself.sh15
-rw-r--r--ld/emulparams/crislinux.sh14
-rw-r--r--ld/emulparams/elf32b4300.sh33
-rw-r--r--ld/emulparams/elf32bmip.sh19
-rwxr-xr-xld/emulparams/elf32bmipn32.sh48
-rw-r--r--ld/emulparams/elf32bsmip.sh31
-rw-r--r--ld/emulparams/elf32btsmip.sh30
-rw-r--r--ld/emulparams/elf32ebmip.sh28
-rw-r--r--ld/emulparams/elf32elmip.sh28
-rwxr-xr-xld/emulparams/elf32fr30.sh2
-rw-r--r--ld/emulparams/elf32l4300.sh27
-rw-r--r--ld/emulparams/elf32lmip.sh31
-rw-r--r--ld/emulparams/elf32lppc.sh21
-rw-r--r--ld/emulparams/elf32lppcsim.sh18
-rw-r--r--ld/emulparams/elf32lsmip.sh31
-rw-r--r--ld/emulparams/elf32ltsmip.sh31
-rw-r--r--ld/emulparams/elf32mcore.sh5
-rw-r--r--ld/emulparams/elf32ppc.sh15
-rw-r--r--ld/emulparams/elf32ppclinux.sh24
-rw-r--r--ld/emulparams/elf32ppcsim.sh18
-rw-r--r--ld/emulparams/elf64_aix.sh11
-rw-r--r--ld/emulparams/elf64_ia64.sh11
-rw-r--r--ld/emulparams/elf64alpha.sh3
-rwxr-xr-xld/emulparams/elf64bmip.sh69
-rw-r--r--ld/emulparams/elf64btsmip.sh31
-rwxr-xr-xld/emulparams/elf64hppa.sh40
-rw-r--r--ld/emulparams/elf64ltsmip.sh42
-rw-r--r--ld/emulparams/elf64mmix.sh6
-rw-r--r--ld/emulparams/h8300elf.sh8
-rw-r--r--ld/emulparams/h8300helf.sh13
-rw-r--r--ld/emulparams/h8300self.sh13
-rw-r--r--ld/emulparams/hppa64linux.sh24
-rw-r--r--ld/emulparams/hppalinux.sh3
-rw-r--r--ld/emulparams/m32relf.sh5
-rw-r--r--ld/emulparams/mn10200.sh9
-rw-r--r--ld/emulparams/mn10300.sh19
-rw-r--r--ld/emulparams/sh.sh3
-rw-r--r--ld/emulparams/shelf.sh5
-rw-r--r--ld/emulparams/shelf_linux.sh14
-rw-r--r--ld/emulparams/shl.sh5
-rw-r--r--ld/emulparams/shlelf.sh17
-rw-r--r--ld/emulparams/shlelf_linux.sh8
-rw-r--r--ld/scripttempl/elf.sc253
-rw-r--r--ld/scripttempl/elfi370.sc5
-rw-r--r--ld/scripttempl/nw.sc5
50 files changed, 715 insertions, 1234 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index ca18d3a..52ff944 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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>
Alan Modra <amodra@bigpond.net.au>
@@ -44,7 +139,7 @@
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.
2001-11-12 Anthony Green <green@redhat.com>
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 06e3a29..3d1ed7f 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -459,42 +459,53 @@ eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
+ $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
+ $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
+ $(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
+ $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
+ $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
+ $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
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}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
+ $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
+ $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
+ $(srcdir)/emulparams/elf64ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
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}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
+ $(srcdir)/emulparams/hppa64linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
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}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
+ $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
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}
${GENSCRIPTS} mmo "$(tdir_mmo)"
eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
+ $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
+ $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
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}
${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
+ $(srcdir)/emulparams/h8300elf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
+ $(srcdir)/emulparams/h8300elf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300self "$(tdir_h8300self)"
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}
${GENSCRIPTS} mipspe "$(tdir_mips)"
emn10300.c: $(srcdir)/emulparams/mn10300.sh \
+ $(srcdir)/emulparams/mn10200.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
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}
${GENSCRIPTS} shelf "$(tdir_shelf)"
eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
+ $(srcdir)/emulparams/shlelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
+ $(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf "$(tdir_shlelf)"
eshl.c: $(srcdir)/emulparams/shl.sh \
+ $(srcdir)/emulparams/sh.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} shl "$(tdir_shl)"
eshpe.c: $(srcdir)/emulparams/shpe.sh \
@@ -982,8 +1006,7 @@ ld.1: $(srcdir)/ld.texinfo
MAINTAINERCLEANFILES = ldver.texi
# We want to reconfigure if configure.host or configure.tgt changes.
-config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt
- $(SHELL) ./config.status --recheck
+CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 069dd3c..b16c0a4 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+@SET_MAKE@
SHELL = @SHELL@
@@ -31,13 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = .
ACLOCAL = @ACLOCAL@
@@ -46,11 +44,11 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
-
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
@@ -72,7 +70,6 @@ CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EMULATION_LIBPATH = @EMULATION_LIBPATH@
-EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
@@ -88,7 +85,6 @@ INTLOBJS = @INTLOBJS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
@@ -105,19 +101,32 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
l = @l@
+CXX = gcc
+
+EMUL = @EMUL@
+EMULATION_OFILES = @EMULATION_OFILES@
+EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
+
+#stuff for self hosting (can be overridden in config file).
+HOSTING_CRT0 = @HOSTING_CRT0@
+HOSTING_LIBS = @HOSTING_LIBS@
+
INTLLIBS = @INTLLIBS@
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
+
+# This is the real libbfd.a created by libtool.
+TESTBFDLIB = @TESTBFDLIB@
+
+WARN_CFLAGS = @WARN_CFLAGS@
+
+YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
AUTOMAKE_OPTIONS = cygnus dejagnu
SUBDIRS = po
tooldir = $(exec_prefix)/$(target_alias)
-
-YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
YFLAGS = -d
-LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
-
-WARN_CFLAGS = @WARN_CFLAGS@
AM_CFLAGS = $(WARN_CFLAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts.
@@ -125,10 +134,6 @@ AM_CFLAGS = $(WARN_CFLAGS)
# directives need to be different for native and cross linkers.
scriptdir = $(tooldir)/lib
-EMUL = @EMUL@
-EMULATION_OFILES = @EMULATION_OFILES@
-EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
-
# Search path to override the default search path for -lfoo libraries.
# If LIB_PATH is empty, the ones in the script (if any) are left alone.
# (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
@@ -153,9 +158,6 @@ TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
POD2MAN = pod2man --center="GNU Development Tools" \
--release="binutils-$(VERSION)" --section=1
-#stuff for self hosting (can be overridden in config file).
-HOSTING_CRT0 = @HOSTING_CRT0@
-HOSTING_LIBS = @HOSTING_LIBS@
HOSTING_EMU = -m $(EMUL)
# Setup the testing framework, if you have one
@@ -186,8 +188,6 @@ CC_FOR_TARGET = ` \
fi; \
fi`
-
-CXX = gcc
CXX_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
if [ -f $$r/../newlib/Makefile ] ; then \
@@ -414,8 +414,8 @@ EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
-# These all start with e so 'make clean' can find them.
+# These all start with e so 'make clean' can find them.
GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
@@ -428,11 +428,11 @@ ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
-# This is the real libbfd.a created by libtool.
-TESTBFDLIB = @TESTBFDLIB@
-
MAINTAINERCLEANFILES = ldver.texi
+# We want to reconfigure if configure.host or configure.tgt changes.
+CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
+
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
@@ -443,260 +443,206 @@ CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
EXTRA_DIST = ldgram.c ldgram.h ldlex.c $(man_MANS)
DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
+subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-noinst_PROGRAMS = ld-new$(EXEEXT)
-PROGRAMS = $(noinst_PROGRAMS)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
+CONFIG_CLEAN_FILES = po/Makefile.in
+noinst_PROGRAMS = ld-new$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+
+am_ld_new_OBJECTS = ldgram.$(OBJEXT) ldlex.$(OBJEXT) lexsup.$(OBJEXT) \
+ ldlang.$(OBJEXT) mri.$(OBJEXT) ldctor.$(OBJEXT) \
+ ldmain.$(OBJEXT) ldwrite.$(OBJEXT) ldexp.$(OBJEXT) \
+ ldemul.$(OBJEXT) ldver.$(OBJEXT) ldmisc.$(OBJEXT) \
+ ldfile.$(OBJEXT) ldcref.$(OBJEXT)
+ld_new_OBJECTS = $(am_ld_new_OBJECTS)
+ld_new_LDFLAGS =
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-ld_new_OBJECTS = ldgram.$(OBJEXT) ldlex.$(OBJEXT) lexsup.$(OBJEXT) \
-ldlang.$(OBJEXT) mri.$(OBJEXT) ldctor.$(OBJEXT) ldmain.$(OBJEXT) \
-ldwrite.$(OBJEXT) ldexp.$(OBJEXT) ldemul.$(OBJEXT) ldver.$(OBJEXT) \
-ldmisc.$(OBJEXT) ldfile.$(OBJEXT) ldcref.$(OBJEXT)
-ld_new_LDFLAGS =
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LEXLIB = @LEXLIB@
-YLWRAP = $(top_srcdir)/../ylwrap
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+depcomp =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
+ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
+LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
+YLWRAP = $(top_srcdir)/ylwrap
+DIST_SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
INFO_DEPS = ld.info
DVIS = ld.dvi
TEXINFOS = ld.texinfo
-man1dir = $(mandir)/man1
-MANS = $(man_MANS)
NROFF = nroff
-DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
-NEWS TODO acinclude.m4 aclocal.m4 config.in configure configure.in \
-deffilep.c ldgram.c ldlex.c
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+MANS = $(man_MANS)
-TAR = gtar
-GZIP_ENV = --best
+RECURSIVE_TARGETS = info-recursive dvi-recursive \
+ uninstall-info-recursive all-recursive install-data-recursive \
+ install-exec-recursive installdirs-recursive install-recursive \
+ uninstall-recursive check-recursive installcheck-recursive
SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
-OBJECTS = $(ld_new_OBJECTS)
-all: all-redirect
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
.SUFFIXES:
-.SUFFIXES: .S .c .dvi .info .l .lo .o .obj .ps .s .texi .texinfo .txi .y
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
+.SUFFIXES: .c .dvi .info .l .lo .o .obj .ps .texinfo .y
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h
@if test ! -f $@; then \
rm -f stamp-h; \
$(MAKE) stamp-h; \
else :; fi
stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
+ @rm -f stamp-h stamp-hT
+ @echo timestamp > stamp-hT 2> /dev/null
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
$(SHELL) ./config.status
- @echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+ @mv stamp-hT stamp-h
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/./stamp-h.in
@if test ! -f $@; then \
- rm -f $(srcdir)/stamp-h.in; \
- $(MAKE) $(srcdir)/stamp-h.in; \
+ rm -f $(srcdir)/./stamp-h.in; \
+ $(MAKE) $(srcdir)/./stamp-h.in; \
else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ @rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
+ @echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-
-mostlyclean-hdr:
-
-clean-hdr:
+ @mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
distclean-hdr:
-rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-noinstPROGRAMS:
+po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in
+ cd $(top_builddir) && CONFIG_FILES=$@:po/Make-in CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+ldgram.h: ldgram.c
+deffilep.h: deffilep.c
+ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
+ @rm -f ld-new$(EXEEXT)
+ $(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
-distclean-noinstPROGRAMS:
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
-maintainer-clean-noinstPROGRAMS:
+distclean-compile:
+ -rm -f *.tab.c
.c.o:
- $(COMPILE) -c $<
+ $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
.c.obj:
$(COMPILE) -c `cygpath -w $<`
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
+ $(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
-maintainer-clean-libtool:
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LEXLIB = @LEXLIB@
-ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
- @rm -f ld-new$(EXEEXT)
- $(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
.l.c:
- $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
-.y.c:
- $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
-deffilep.h: deffilep.c
-ldgram.h: ldgram.c
+ $(LEXCOMPILE) $< && mv $(LEX_OUTPUT_ROOT).c $@
+.y.c:
+ $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h -- $(YACCCOMPILE)
ld.info: ld.texinfo
ld.dvi: ld.texinfo
-
-DVIPS = dvips
-
-.texi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.texi:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
.texinfo.info:
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
+ -I $(srcdir) $<
.texinfo.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.txi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.txi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2DVI) $<
-.txi:
+.texinfo:
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
+ -I $(srcdir) $<
+
+MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
+ echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
+ else \
+ echo makeinfo; \
+ fi`
+
+TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
+ echo $(top_srcdir)/../texinfo/util/texi2dvi; \
+ else \
+ echo texi2dvi; \
+ fi`
+DVIPS = dvips
.dvi.ps:
$(DVIPS) $< -o $@
-install-info-am: $(INFO_DEPS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(infodir)
- @list='$(INFO_DEPS)'; \
- for file in $$list; do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
- if test -f $$d/$$ifile; then \
- echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
- else : ; fi; \
- done; \
- done
- @$(POST_INSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+uninstall-info-am:
+ $(PRE_UNINSTALL)
+ @if (install-info --version && \
+ install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
- echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
- install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
+ install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
done; \
- else : ; fi
-
-uninstall-info:
- $(PRE_UNINSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- ii=yes; \
- else ii=; fi; \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- test -z "$$ii" \
- || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
- done
+ else :; fi
@$(NORMAL_UNINSTALL)
- list='$(INFO_DEPS)'; \
+ @list='$(INFO_DEPS)'; \
for file in $$list; do \
- (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ (if cd $(DESTDIR)$(infodir); then \
+ echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
+ rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
+ else :; fi); \
done
dist-info: $(INFO_DEPS)
list='$(INFO_DEPS)'; \
for base in $$list; do \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
- for file in `cd $$d && eval echo $$base*`; do \
+ for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done; \
done
mostlyclean-aminfo:
- -rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.fns ld.ky ld.kys ld.ps \
- ld.log ld.pg ld.toc ld.tp ld.tps ld.vr ld.vrs ld.op ld.tr \
- ld.cv ld.cn
-
-clean-aminfo:
-
-distclean-aminfo:
+ -rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.ky ld.log ld.pg ld.ps ld.toc ld.tp \
+ ld.vr
maintainer-clean-aminfo:
for i in $(INFO_DEPS); do \
@@ -705,12 +651,16 @@ maintainer-clean-aminfo:
rm -f $$i-[0-9]*; \
fi; \
done
+
clean-info: mostlyclean-aminfo
-install-man1:
+man1dir = $(mandir)/man1
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(man1dir)
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
@@ -720,14 +670,16 @@ install-man1:
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
done
-
uninstall-man1:
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
@@ -735,16 +687,11 @@ uninstall-man1:
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
rm -f $(DESTDIR)$(man1dir)/$$inst; \
done
-install-man: $(MANS)
- @$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-man1
-uninstall-man:
- @$(NORMAL_UNINSTALL)
- $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -752,12 +699,7 @@ uninstall-man:
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
+$(RECURSIVE_TARGETS):
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
@@ -780,11 +722,16 @@ mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
+ rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
@@ -803,154 +750,83 @@ tags-recursive:
tags: TAGS
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique $(LISP)
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
+ fi; \
done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
+ || etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP)
-clean-tags:
+GTAGS:
+ here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DEJATOOL = $(PACKAGE)
-
-RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
+RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
site.exp: Makefile
@echo 'Making a new site.exp file...'
- @test ! -f site.bak || rm -f site.bak
- @echo '## these variables are automatically generated by make ##' > $@-t
- @echo '# Do not edit here. If you wish to override these values' >> $@-t
- @echo '# edit the last section' >> $@-t
- @echo 'set tool $(DEJATOOL)' >> $@-t
- @echo 'set srcdir $(srcdir)' >> $@-t
- @echo 'set objdir' `pwd` >> $@-t
- @echo 'set host_alias $(host_alias)' >> $@-t
- @echo 'set host_triplet $(host_triplet)' >> $@-t
- @echo 'set target_alias $(target_alias)' >> $@-t
- @echo 'set target_triplet $(target_triplet)' >> $@-t
- @echo 'set build_alias $(build_alias)' >> $@-t
- @echo 'set build_triplet $(build_triplet)' >> $@-t
- @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
- @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
+ @echo '## these variables are automatically generated by make ##' >site.tmp
+ @echo '# Do not edit here. If you wish to override these values' >>site.tmp
+ @echo '# edit the last section' >>site.tmp
+ @echo 'set tool $(DEJATOOL)' >>site.tmp
+ @echo 'set srcdir $(srcdir)' >>site.tmp
+ @echo "set objdir `pwd`" >>site.tmp
+ @echo 'set build_alias $(build_alias)' >>site.tmp
+ @echo 'set build_triplet $(build_triplet)' >>site.tmp
+ @echo 'set host_alias $(host_alias)' >>site.tmp
+ @echo 'set host_triplet $(host_triplet)' >>site.tmp
+ @echo 'set target_alias $(target_alias)' >>site.tmp
+ @echo 'set target_triplet $(target_triplet)' >>site.tmp
+ @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+ @test ! -f site.exp || \
+ sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+ @-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
- @mv $@-t site.exp
-info-am: $(INFO_DEPS)
-info: info-recursive
-dvi-am: $(DVIS)
-dvi: dvi-recursive
+ @mv site.tmp site.exp
check-am:
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-all-recursive-am: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
+all-am: Makefile $(PROGRAMS) $(MANS) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(man1dir)
-install-exec-am: install-exec-local
+install: install-recursive
install-exec: install-exec-recursive
-
-install-data-am: install-man install-data-local
install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-man
-uninstall: uninstall-recursive
-all-am: Makefile $(PROGRAMS) $(MANS) config.h
-all-redirect: all-recursive-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
-
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
@@ -958,65 +834,98 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "ldlexldeffilephdeffilepcldgramhldgramc$(MAINTAINERCLEANFILES)" || rm -f ldlexl deffileph deffilepc ldgramh ldgramc $(MAINTAINERCLEANFILES)
-mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
- mostlyclean-compile mostlyclean-libtool \
- mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \
- mostlyclean-local
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "ldgram.hdeffilep.h$(MAINTAINERCLEANFILES)" || rm -f ldgram.h deffilep.h $(MAINTAINERCLEANFILES)
+clean: clean-recursive
-mostlyclean: mostlyclean-recursive
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
-clean-am: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
- clean-aminfo clean-tags clean-generic mostlyclean-am
+distclean: distclean-recursive
+ -rm -f config.status config.cache config.log
+distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \
+ distclean-libtool distclean-local distclean-tags
-clean: clean-recursive
+dvi: dvi-recursive
-distclean-am: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
- distclean-libtool distclean-aminfo distclean-tags \
- distclean-generic clean-am distclean-local
- -rm -f libtool
+dvi-am: $(DVIS)
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-hdr \
- maintainer-clean-noinstPROGRAMS \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-aminfo maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+info: info-recursive
+
+info-am: $(INFO_DEPS)
+
+install-data-am: install-data-local install-man
+
+install-exec-am: install-exec-local
+
+install-info:
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+ if test -f $$d/$$ifile; then \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
+ else : ; fi; \
+ done; \
+ done
+ @$(POST_INSTALL)
+ @if (install-info --version && \
+ install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ done; \
+ else : ; fi
+install-man: install-man1
+
+installcheck-am:
maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
-clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool install-info-am uninstall-info \
-mostlyclean-aminfo distclean-aminfo clean-aminfo \
-maintainer-clean-aminfo install-man1 uninstall-man1 install-man \
-uninstall-man install-data-recursive uninstall-data-recursive \
-install-exec-recursive uninstall-exec-recursive installdirs-recursive \
-uninstalldirs-recursive all-recursive check-recursive \
-installcheck-recursive info-recursive dvi-recursive \
-mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
-info-am info dvi-am dvi check check-am installcheck-am installcheck \
-install-info-am install-info all-recursive-am install-exec-local \
-install-exec-am install-exec install-data-local install-data-am \
-install-data install-am install uninstall-am uninstall all-redirect \
-all-am all installdirs-am installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+ maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local
+
+uninstall-am: uninstall-man
+
+uninstall-info: uninstall-info-recursive
+
+uninstall-man: uninstall-man1
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-DEJAGNU \
+ check-am clean clean-generic clean-info clean-libtool \
+ clean-noinstPROGRAMS clean-recursive dist-info distclean \
+ distclean-compile distclean-generic distclean-hdr \
+ distclean-libtool distclean-local distclean-recursive \
+ distclean-tags dvi dvi-am dvi-recursive info info-am \
+ info-recursive install install-am install-data install-data-am \
+ install-data-local install-data-recursive install-exec \
+ install-exec-am install-exec-local install-exec-recursive \
+ install-info install-info-am install-man install-man1 \
+ install-recursive install-strip installcheck installcheck-am \
+ installdirs installdirs-am installdirs-recursive \
+ maintainer-clean maintainer-clean-aminfo \
+ maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+ mostlyclean-aminfo mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local mostlyclean-recursive \
+ tags tags-recursive uninstall uninstall-am uninstall-info-am \
+ uninstall-info-recursive uninstall-man uninstall-man1 \
+ uninstall-recursive
po/POTFILES.in: @MAINT@ Makefile
@@ -1173,42 +1082,53 @@ eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
+ $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
+ $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
+ $(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
+ $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
+ $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
+ $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
@@ -1218,15 +1138,18 @@ eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
+ $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
+ $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
+ $(srcdir)/emulparams/elf64ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
@@ -1236,6 +1159,7 @@ eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
+ $(srcdir)/emulparams/hppa64linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
@@ -1252,6 +1176,7 @@ eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
+ $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
@@ -1263,9 +1188,11 @@ emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
$(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
${GENSCRIPTS} mmo "$(tdir_mmo)"
eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
+ $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
+ $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
@@ -1305,9 +1232,11 @@ eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
+ $(srcdir)/emulparams/h8300elf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
+ $(srcdir)/emulparams/h8300elf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300self "$(tdir_h8300self)"
eh8500.c: $(srcdir)/emulparams/h8500.sh \
@@ -1455,6 +1384,7 @@ emipspe.c: $(srcdir)/emulparams/mipspe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipspe "$(tdir_mips)"
emn10300.c: $(srcdir)/emulparams/mn10300.sh \
+ $(srcdir)/emulparams/mn10200.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
emn10200.c: $(srcdir)/emulparams/mn10200.sh \
@@ -1500,15 +1430,18 @@ eshelf.c: $(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf "$(tdir_shelf)"
eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
+ $(srcdir)/emulparams/shlelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
+ $(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf "$(tdir_shlelf)"
eshl.c: $(srcdir)/emulparams/shl.sh \
+ $(srcdir)/emulparams/sh.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} shl "$(tdir_shl)"
eshpe.c: $(srcdir)/emulparams/shpe.sh \
@@ -1681,10 +1614,6 @@ ld.1: $(srcdir)/ld.texinfo
mv -f $@.T$$$$ $@) || \
(rm -f $@.T$$$$ && exit 1)
rm -f ld.pod
-
-# We want to reconfigure if configure.host or configure.tgt changes.
-config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt
- $(SHELL) ./config.status --recheck
mostlyclean-local:
-rm -rf tmpdir
@@ -1836,7 +1765,6 @@ deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
ldmisc.h deffile.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/ld/emulparams/armelf.sh b/ld/emulparams/armelf.sh
index 697bf90..0e8ebc5 100644
--- a/ld/emulparams/armelf.sh
+++ b/ld/emulparams/armelf.sh
@@ -20,6 +20,5 @@ MAXPAGESIZE=256
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) }'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x80000
diff --git a/ld/emulparams/armelf_oabi.sh b/ld/emulparams/armelf_oabi.sh
index d568328..f1c967d 100644
--- a/ld/emulparams/armelf_oabi.sh
+++ b/ld/emulparams/armelf_oabi.sh
@@ -16,6 +16,5 @@ MAXPAGESIZE=256
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) }'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x80000
diff --git a/ld/emulparams/criself.sh b/ld/emulparams/criself.sh
index 141ab51..f961281 100644
--- a/ld/emulparams/criself.sh
+++ b/ld/emulparams/criself.sh
@@ -32,11 +32,11 @@ __start = DEFINED(__start) ? __start :
'
# Smuggle an "OTHER_TEXT_END_SYMBOLS" here.
-OTHER_READONLY_SECTIONS='PROVIDE (__Etext = .);'
+OTHER_READONLY_SECTIONS="${RELOCATING+PROVIDE (__Etext = .);}"
DATA_START_SYMBOLS='PROVIDE (__Sdata = .);'
# 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
# address, we can't get to it with OTHER_BSS_SYMBOLS, neither can we
@@ -95,11 +95,8 @@ CTOR_END='
___elf_ctors_dtors_end = .;
'
-
-# Smuggle an "OTHER_ALL_END_SYMBOLS" here.
# Also add the other symbols provided for rsim/xsim and elinux.
-OTHER_RELOCATING_SECTIONS='
-PROVIDE (__Eall = .);
-PROVIDE (__Endmem = 0x10000000);
-PROVIDE (__Stacksize = 0);
-'
+OTHER_END_SYMBOLS="
+ PROVIDE (__Eall = .);
+ PROVIDE (__Endmem = 0x10000000);
+ PROVIDE (__Stacksize = 0);"
diff --git a/ld/emulparams/crislinux.sh b/ld/emulparams/crislinux.sh
index e33b462..259670d 100644
--- a/ld/emulparams/crislinux.sh
+++ b/ld/emulparams/crislinux.sh
@@ -22,18 +22,16 @@ MAXPAGESIZE=8192
TEXT_START_SYMBOLS='PROVIDE (__Stext = .);'
# Smuggle an "OTHER_TEXT_END_SYMBOLS" here.
-OTHER_READONLY_SECTIONS='PROVIDE (__Etext = .);'
+OTHER_READONLY_SECTIONS="${RELOCATING+PROVIDE (__Etext = .);}"
DATA_START_SYMBOLS='PROVIDE (__Sdata = .);'
# 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_END_SYMBOLS='PROVIDE (__Ebss = .);'
-# Smuggle an "OTHER_ALL_END_SYMBOLS" here.
# Also add the other symbols provided for rsim/xsim and elinux.
-OTHER_RELOCATING_SECTIONS='
-PROVIDE (__Eall = .);
-PROVIDE(__Endmem = 0x10000000);
-PROVIDE(__Stacksize = 0);
-'
+OTHER_END_SYMBOLS="
+ PROVIDE (__Eall = .);
+ PROVIDE (__Endmem = 0x10000000);
+ PROVIDE (__Stacksize = 0);"
diff --git a/ld/emulparams/elf32b4300.sh b/ld/emulparams/elf32b4300.sh
index 88626a4..4bfdd6e 100644
--- a/ld/emulparams/elf32b4300.sh
+++ b/ld/emulparams/elf32b4300.sh
@@ -1,29 +1,10 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-bigmips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
+# If you change this file, please also look at files which source this one:
+# elf32l4300.sh
+
+EMBEDDED=yes
+. ${srcdir}/emulparams/elf32bmip.sh
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 = .;'
+unset NONPAGED_TEXT_START_ADDR
+unset SHLIB_TEXT_START_ADDR
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
diff --git a/ld/emulparams/elf32bmip.sh b/ld/emulparams/elf32bmip.sh
index 0c07663..cf2abde 100644
--- a/ld/emulparams/elf32bmip.sh
+++ b/ld/emulparams/elf32bmip.sh
@@ -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
OUTPUT_FORMAT="elf32-bigmips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
-DATA_ADDR=0x10000000
+test -n "${EMBEDDED}" || DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
-TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+test -n "${EMBEDDED}" || TEXT_DYNAMIC=
+INITIAL_READONLY_SECTIONS="
+ .reginfo ${RELOCATING-0} : { *(.reginfo) }
+"
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
+OTHER_SDATA_SECTIONS="
+ .lit8 ${RELOCATING-0} : { *(.lit8) }
+ .lit4 ${RELOCATING-0} : { *(.lit4) }
+"
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
diff --git a/ld/emulparams/elf32bmipn32.sh b/ld/emulparams/elf32bmipn32.sh
index b060808..8dc1735 100755
--- a/ld/emulparams/elf32bmipn32.sh
+++ b/ld/emulparams/elf32bmipn32.sh
@@ -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.
SCRIPT_NAME=elf
@@ -17,11 +20,11 @@ ENTRY=__start
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
- .srdata : { *(.srdata) }
-'
+OTHER_SDATA_SECTIONS="
+ .lit8 ${RELOCATING-0} : { *(.lit8) }
+ .lit4 ${RELOCATING-0} : { *(.lit4) }
+ .srdata ${RELOCATING-0} : { *(.srdata) }
+"
# Magic symbols.
TEXT_START_SYMBOLS='_ftext = . ;'
@@ -41,35 +44,28 @@ EXECUTABLE_SYMBOLS="
# segment.
WRITABLE_RODATA=
-OTHER_RELOCATING_SECTIONS='
- .MIPS.events.text :
+OTHER_SECTIONS="
+ .MIPS.events.text ${RELOCATING-0} :
{
- *(.MIPS.events.text)
- *(.MIPS.events.gnu.linkonce.t*)
+ *(.MIPS.events.text${RELOCATING+ .MIPS.events.gnu.linkonce.t*})
}
- .MIPS.content.text :
+ .MIPS.content.text ${RELOCATING-0} :
{
- *(.MIPS.content.text)
- *(.MIPS.content.gnu.linkonce.t*)
+ *(.MIPS.content.text${RELOCATING+ .MIPS.content.gnu.linkonce.t*})
}
- .MIPS.events.data :
+ .MIPS.events.data ${RELOCATING-0} :
{
- *(.MIPS.events.data)
- *(.MIPS.events.gnu.linkonce.d*)
+ *(.MIPS.events.data${RELOCATING+ .MIPS.events.gnu.linkonce.d*})
}
- .MIPS.content.data :
+ .MIPS.content.data ${RELOCATING-0} :
{
- *(.MIPS.content.data)
- *(.MIPS.content.gnu.linkonce.d*)
+ *(.MIPS.content.data${RELOCATING+ .MIPS.content.gnu.linkonce.d*})
}
- .MIPS.events.rodata :
+ .MIPS.events.rodata ${RELOCATING-0} :
{
- *(.MIPS.events.rodata)
- *(.MIPS.events.gnu.linkonce.r*)
+ *(.MIPS.events.rodata${RELOCATING+ .MIPS.events.gnu.linkonce.r*})
}
- .MIPS.content.rodata :
+ .MIPS.content.rodata ${RELOCATING-0} :
{
- *(.MIPS.content.rodata)
- *(.MIPS.content.gnu.linkonce.r*)
- }
-'
+ *(.MIPS.content.rodata${RELOCATING+ .MIPS.content.gnu.linkonce.r*})
+ }"
diff --git a/ld/emulparams/elf32bsmip.sh b/ld/emulparams/elf32bsmip.sh
index 78421d1..5b2939a 100644
--- a/ld/emulparams/elf32bsmip.sh
+++ b/ld/emulparams/elf32bsmip.sh
@@ -1,31 +1,2 @@
-SCRIPT_NAME=elf
-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
+. ${srcdir}/emulparams/elf32bmip.sh
ENTRY=__start
diff --git a/ld/emulparams/elf32btsmip.sh b/ld/emulparams/elf32btsmip.sh
index 9c8e344..5c32c2d 100644
--- a/ld/emulparams/elf32btsmip.sh
+++ b/ld/emulparams/elf32btsmip.sh
@@ -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"
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
diff --git a/ld/emulparams/elf32ebmip.sh b/ld/emulparams/elf32ebmip.sh
index 14eb318..704b43e 100644
--- a/ld/emulparams/elf32ebmip.sh
+++ b/ld/emulparams/elf32ebmip.sh
@@ -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
+. ${srcdir}/emulparams/elf32bmip.sh
diff --git a/ld/emulparams/elf32elmip.sh b/ld/emulparams/elf32elmip.sh
index 865553c..c94e503 100644
--- a/ld/emulparams/elf32elmip.sh
+++ b/ld/emulparams/elf32elmip.sh
@@ -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
+. ${srcdir}/emulparams/elf32lmip.sh
diff --git a/ld/emulparams/elf32fr30.sh b/ld/emulparams/elf32fr30.sh
index 53d6a74..cec006c 100755
--- a/ld/emulparams/elf32fr30.sh
+++ b/ld/emulparams/elf32fr30.sh
@@ -7,4 +7,4 @@ MAXPAGESIZE=256
ENTRY=_start
EMBEDDED=yes
NOP=0x9fa09fa0
-OTHER_RELOCATING_SECTIONS='PROVIDE (__stack = 0x200000);'
+OTHER_END_SYMBOLS='PROVIDE (__stack = 0x200000);'
diff --git a/ld/emulparams/elf32l4300.sh b/ld/emulparams/elf32l4300.sh
index 4bd48e8..865792a 100644
--- a/ld/emulparams/elf32l4300.sh
+++ b/ld/emulparams/elf32l4300.sh
@@ -1,29 +1,4 @@
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/elf32b4300.sh
OUTPUT_FORMAT="elf32-littlemips"
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
diff --git a/ld/emulparams/elf32lmip.sh b/ld/emulparams/elf32lmip.sh
index 99a9dd8..14d4ded 100644
--- a/ld/emulparams/elf32lmip.sh
+++ b/ld/emulparams/elf32lmip.sh
@@ -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"
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
diff --git a/ld/emulparams/elf32lppc.sh b/ld/emulparams/elf32lppc.sh
index bc9125d..18cce48 100644
--- a/ld/emulparams/elf32lppc.sh
+++ b/ld/emulparams/elf32lppc.sh
@@ -1,18 +1,5 @@
-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
-SCRIPT_NAME=elf
+# If you change this file, please also look at files which source this one:
+# elf32lppcsim.sh
+
+. ${srcdir}/emulparams/elf32ppc.sh
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) }
-'
diff --git a/ld/emulparams/elf32lppcsim.sh b/ld/emulparams/elf32lppcsim.sh
index 74959f8..e743852 100644
--- a/ld/emulparams/elf32lppcsim.sh
+++ b/ld/emulparams/elf32lppcsim.sh
@@ -1,18 +1,2 @@
-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
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpcle"
+. ${srcdir}/emulparams/elf32lppc.sh
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) }
-'
diff --git a/ld/emulparams/elf32lsmip.sh b/ld/emulparams/elf32lsmip.sh
index 4f792e2..62e4f98 100644
--- a/ld/emulparams/elf32lsmip.sh
+++ b/ld/emulparams/elf32lsmip.sh
@@ -1,31 +1,2 @@
-SCRIPT_NAME=elf
-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
+. ${srcdir}/emulparams/elf32lmip.sh
ENTRY=__start
diff --git a/ld/emulparams/elf32ltsmip.sh b/ld/emulparams/elf32ltsmip.sh
index 443b98f..4a660f0 100644
--- a/ld/emulparams/elf32ltsmip.sh
+++ b/ld/emulparams/elf32ltsmip.sh
@@ -1,31 +1,2 @@
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/elf32btsmip.sh
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
diff --git a/ld/emulparams/elf32mcore.sh b/ld/emulparams/elf32mcore.sh
index 06b2325..36befc8 100644
--- a/ld/emulparams/elf32mcore.sh
+++ b/ld/emulparams/elf32mcore.sh
@@ -24,9 +24,8 @@ NOP=0x0e0e0e0e
OTHER_BSS_SYMBOLS="__bss_start__ = . ;"
OTHER_BSS_END_SYMBOLS="__bss_end__ = . ;"
-# 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) }'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x80000
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
diff --git a/ld/emulparams/elf32ppc.sh b/ld/emulparams/elf32ppc.sh
index 2220810..261e4bf 100644
--- a/ld/emulparams/elf32ppc.sh
+++ b/ld/emulparams/elf32ppc.sh
@@ -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
-# 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"
@@ -11,8 +12,8 @@ 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) }
-'
+OTHER_READWRITE_SECTIONS="
+ .fixup ${RELOCATING-0} : { *(.fixup) }
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ .got2 ${RELOCATING-0} : { *(.got2) }
+"
diff --git a/ld/emulparams/elf32ppclinux.sh b/ld/emulparams/elf32ppclinux.sh
index 7c458a2..5ced00d 100644
--- a/ld/emulparams/elf32ppclinux.sh
+++ b/ld/emulparams/elf32ppclinux.sh
@@ -1,18 +1,8 @@
-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
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpc"
+. ${srcdir}/emulparams/elf32ppc.sh
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x10000
-ARCH=powerpc
-MACHINE=
-BSS_PLT=
-OTHER_RELOCATING_SECTIONS='
- /DISCARD/ : { *(.fixup) }
-'
-OTHER_READWRITE_SECTIONS='
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
+unset EXECUTABLE_SYMBOLS
+unset OTHER_BSS_END_SYMBOLS
+test -z "${RELOCATING}" || OTHER_SECTIONS="/DISCARD/ : { *(.fixup) }"
+OTHER_READWRITE_SECTIONS="
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ .got2 ${RELOCATING-0} : { *(.got2) }"
diff --git a/ld/emulparams/elf32ppcsim.sh b/ld/emulparams/elf32ppcsim.sh
index e25a170..c3466cf 100644
--- a/ld/emulparams/elf32ppcsim.sh
+++ b/ld/emulparams/elf32ppcsim.sh
@@ -1,18 +1,2 @@
-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
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpc"
+. ${srcdir}/emulparams/elf32ppc.sh
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) }
-'
diff --git a/ld/emulparams/elf64_aix.sh b/ld/emulparams/elf64_aix.sh
index af6b63a..23ba731 100644
--- a/ld/emulparams/elf64_aix.sh
+++ b/ld/emulparams/elf64_aix.sh
@@ -10,7 +10,12 @@ TEXT_START_ADDR="0x10000000"
DATA_ADDR="0x20000000 + (. & (${MAXPAGESIZE} - 1))"
GENERATE_SHLIB_SCRIPT=yes
NOP=0x00300000010070000002000001000400 # a bundle full of nops
-OTHER_GOT_SECTIONS='.IA_64.pltoff : { *(.IA_64.pltoff) }'
-OTHER_PLT_RELOC_SECTIONS='.rela.IA_64.pltoff : { *(.rela.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_GOT_SECTIONS="
+ .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }"
+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
diff --git a/ld/emulparams/elf64_ia64.sh b/ld/emulparams/elf64_ia64.sh
index 2dc7026..0699d3d 100644
--- a/ld/emulparams/elf64_ia64.sh
+++ b/ld/emulparams/elf64_ia64.sh
@@ -11,6 +11,11 @@ TEXT_START_ADDR="0x4000000000000000"
DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))"
GENERATE_SHLIB_SCRIPT=yes
NOP=0x00300000010070000002000001000400 # a bundle full of nops
-OTHER_GOT_SECTIONS='.IA_64.pltoff : { *(.IA_64.pltoff) }'
-OTHER_PLT_RELOC_SECTIONS='.rela.IA_64.pltoff : { *(.rela.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_GOT_SECTIONS="
+ .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }"
+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.*}) }"
diff --git a/ld/emulparams/elf64alpha.sh b/ld/emulparams/elf64alpha.sh
index f31a38c..e1eaa11 100644
--- a/ld/emulparams/elf64alpha.sh
+++ b/ld/emulparams/elf64alpha.sh
@@ -12,7 +12,8 @@ GENERATE_SHLIB_SCRIPT=yes
DATA_PLT=
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
# and allows us to define our own command line switches.
diff --git a/ld/emulparams/elf64bmip.sh b/ld/emulparams/elf64bmip.sh
index 8610e2b..990fcb6 100755
--- a/ld/emulparams/elf64bmip.sh
+++ b/ld/emulparams/elf64bmip.sh
@@ -1,79 +1,12 @@
-# This is an ELF platform.
-SCRIPT_NAME=elf
-
-# Handle both big- and little-ended 32-bit MIPS objects.
-ARCH=mips
+. ${srcdir}/emulparams/elf32bmipn32.sh
OUTPUT_FORMAT="elf64-bigmips"
BIG_OUTPUT_FORMAT="elf64-bigmips"
LITTLE_OUTPUT_FORMAT="elf64-littlemips"
-
-# Note that the elf32 template is used for 64-bit emulations as well
-# as 32-bit emulations.
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.
EXECUTABLE_SYMBOLS="
__dso_displacement = 0;
__elf_header = ${TEXT_START_ADDR};
__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*)
- }
-'
diff --git a/ld/emulparams/elf64btsmip.sh b/ld/emulparams/elf64btsmip.sh
index 69edab9..df7566a 100644
--- a/ld/emulparams/elf64btsmip.sh
+++ b/ld/emulparams/elf64btsmip.sh
@@ -1,39 +1,20 @@
-# This is an ELF platform.
-SCRIPT_NAME=elf
+# If you change this file, please also look at files which source this one:
+# elf64ltsmip.sh
-# Handle both big- and little-ended 64-bit MIPS objects.
-ARCH=mips
+. ${srcdir}/emulparams/elf32bmipn32.sh
OUTPUT_FORMAT="elf64-tradbigmips"
BIG_OUTPUT_FORMAT="elf64-tradbigmips"
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
+GENERATE_SHLIB_SCRIPT=yes
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 = .;'
+unset EXECUTABLE_SYMBOLS
+unset WRITABLE_RODATA
# Magic sections.
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
diff --git a/ld/emulparams/elf64hppa.sh b/ld/emulparams/elf64hppa.sh
index 402f8ce..8a44179 100755
--- a/ld/emulparams/elf64hppa.sh
+++ b/ld/emulparams/elf64hppa.sh
@@ -1,9 +1,10 @@
-SCRIPT_NAME=elf
-ELFSIZE=64
+. ${srcdir}/emulparams/hppa64linux.sh
OUTPUT_FORMAT="elf64-hppa"
LIB_PATH=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64
TEXT_START_ADDR=0x4000000000001000
DATA_ADDR=0x8000000000001000
+TARGET_PAGE_SIZE=4096
+MAXPAGESIZE=4096
# The HP dynamic linker actually requires you set the start of text and
# data to some reasonable value. Of course nobody knows what reasoanble
@@ -11,43 +12,8 @@ DATA_ADDR=0x8000000000001000
SHLIB_TEXT_START_ADDR=0x4000000000001000
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.
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
# 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 = .);'
diff --git a/ld/emulparams/elf64ltsmip.sh b/ld/emulparams/elf64ltsmip.sh
index c6d0e57..efd6b7d 100644
--- a/ld/emulparams/elf64ltsmip.sh
+++ b/ld/emulparams/elf64ltsmip.sh
@@ -1,44 +1,4 @@
-# This is an ELF platform.
-SCRIPT_NAME=elf
-
-# Handle both big- and little-ended 64-bit MIPS objects.
-ARCH=mips
+. ${srcdir}/emulparams/elf64btsmip.sh
OUTPUT_FORMAT="elf64-tradlittlemips"
BIG_OUTPUT_FORMAT="elf64-tradbigmips"
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) }
-'
diff --git a/ld/emulparams/elf64mmix.sh b/ld/emulparams/elf64mmix.sh
index dc4b9e5..c811ce0 100644
--- a/ld/emulparams/elf64mmix.sh
+++ b/ld/emulparams/elf64mmix.sh
@@ -44,17 +44,17 @@ OTHER_TEXT_SECTIONS='
PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.));
'
-OTHER_RELOCATING_SECTIONS='
+OTHER_SECTIONS="
.MMIX.reg_contents :
{
/* Note that this section always has a fixed VMA - that of its
first register * 8. */
*(.MMIX.reg_contents);
}
-'
+"
# FIXME: Also bit by the PROVIDE bug? If not, this could be
# EXECUTABLE_SYMBOLS.
# By default, put the high end of the stack where the register stack
# begins. They grow in opposite directions. */
-OTHER_SECTIONS='PROVIDE (__Stack_start = 0x6000000000000000);'
+OTHER_END_SYMBOLS="PROVIDE (__Stack_start = 0x6000000000000000);"
diff --git a/ld/emulparams/h8300elf.sh b/ld/emulparams/h8300elf.sh
index e3024c6..0617d5b 100644
--- a/ld/emulparams/h8300elf.sh
+++ b/ld/emulparams/h8300elf.sh
@@ -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
OUTPUT_FORMAT="elf32-h8300"
TEXT_START_ADDR=0x100
@@ -6,7 +9,4 @@ TARGET_PAGE_SIZE=128
ARCH=h8300
TEMPLATE_NAME=elf32
EMBEDDED=yes
-
-OTHER_RELOCATING_SECTIONS='
-.stack 0xfefc : { _stack = .; *(.stack) }
-'
+STACK_ADDR=0xfefc
diff --git a/ld/emulparams/h8300helf.sh b/ld/emulparams/h8300helf.sh
index cf72e1b..1cde35c 100644
--- a/ld/emulparams/h8300helf.sh
+++ b/ld/emulparams/h8300helf.sh
@@ -1,12 +1,3 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-h8300"
-TEXT_START_ADDR=0x100
-MAXPAGESIZE=2
-TARGET_PAGE_SIZE=128
+. ${srcdir}/emulparams/h8300elf.sh
ARCH="h8300:h8300h"
-TEMPLATE_NAME=elf32
-EMBEDDED=yes
-
-OTHER_RELOCATING_SECTIONS='
-.stack 0x2fefc : { _stack = .; *(.stack) }
-'
+STACK_ADDR=0x2fefc
diff --git a/ld/emulparams/h8300self.sh b/ld/emulparams/h8300self.sh
index 20ed7ca..7539eec 100644
--- a/ld/emulparams/h8300self.sh
+++ b/ld/emulparams/h8300self.sh
@@ -1,12 +1,3 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-h8300"
-TEXT_START_ADDR=0x100
-MAXPAGESIZE=2
-TARGET_PAGE_SIZE=128
+. ${srcdir}/emulparams/h8300elf.sh
ARCH="h8300:h8300s"
-TEMPLATE_NAME=elf32
-EMBEDDED=yes
-
-OTHER_RELOCATING_SECTIONS='
-.stack 0x2fefc : { _stack = .; *(.stack) }
-'
+STACK_ADDR=0x2fefc
diff --git a/ld/emulparams/hppa64linux.sh b/ld/emulparams/hppa64linux.sh
index 3fe422b..49bcf32 100644
--- a/ld/emulparams/hppa64linux.sh
+++ b/ld/emulparams/hppa64linux.sh
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# elf64hppa.sh
+
SCRIPT_NAME=elf
ELFSIZE=64
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,
# 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
# 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.
# 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_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 = 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.
OTHER_GOT_RELOC_SECTIONS='.rela.dlt : { *(.rela.dlt) }'
diff --git a/ld/emulparams/hppalinux.sh b/ld/emulparams/hppalinux.sh
index 0a98298..a4c4904 100644
--- a/ld/emulparams/hppalinux.sh
+++ b/ld/emulparams/hppalinux.sh
@@ -8,7 +8,8 @@ ARCH=hppa
MACHINE=hppa1.1 # We use 1.1 specific features.
NOP=0x08000240
START="_start"
-OTHER_READONLY_SECTIONS='.PARISC.unwind : { *(.PARISC.unwind) } '
+OTHER_READONLY_SECTIONS="
+ .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }"
DATA_START_SYMBOLS='PROVIDE ($global$ = .);'
DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes
diff --git a/ld/emulparams/m32relf.sh b/ld/emulparams/m32relf.sh
index cd7705a..c67472a 100644
--- a/ld/emulparams/m32relf.sh
+++ b/ld/emulparams/m32relf.sh
@@ -8,6 +8,5 @@ MACHINE=
MAXPAGESIZE=32
EMBEDDED=yes
-# Hmmm, there's got to be a better way. This sets the stack to the
-# top of simulator memory (8MB).
-OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = 0x800000);'
+# This sets the stack to the top of simulator memory (8MB).
+OTHER_END_SYMBOLS='PROVIDE (_stack = 0x800000);'
diff --git a/ld/emulparams/mn10200.sh b/ld/emulparams/mn10200.sh
index 6324322..f96224b 100644
--- a/ld/emulparams/mn10200.sh
+++ b/ld/emulparams/mn10200.sh
@@ -1,4 +1,6 @@
-MACHINE=
+# If you change this file, please also look at files which source this one:
+# mn10300.sh
+
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-mn10200"
TEXT_START_ADDR=0x0
@@ -8,9 +10,8 @@ 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) }'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x80000
# These are for compatibility with the COFF toolchain.
# XXX These should definitely disappear.
diff --git a/ld/emulparams/mn10300.sh b/ld/emulparams/mn10300.sh
index 44a40e5..eec2f84 100644
--- a/ld/emulparams/mn10300.sh
+++ b/ld/emulparams/mn10300.sh
@@ -1,20 +1,3 @@
-MACHINE=
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/mn10200.sh
OUTPUT_FORMAT="elf32-mn10300"
-TEXT_START_ADDR=0x0
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 = .;'
diff --git a/ld/emulparams/sh.sh b/ld/emulparams/sh.sh
index 38844fb..52d1443 100644
--- a/ld/emulparams/sh.sh
+++ b/ld/emulparams/sh.sh
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# shl.sh
+
SCRIPT_NAME=sh
OUTPUT_FORMAT="coff-sh"
TEXT_START_ADDR=0x8000
diff --git a/ld/emulparams/shelf.sh b/ld/emulparams/shelf.sh
index 95db587..d360022 100644
--- a/ld/emulparams/shelf.sh
+++ b/ld/emulparams/shelf.sh
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# shlelf.sh
+
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-sh"
TEXT_START_ADDR=0x1000
@@ -14,4 +17,4 @@ CTOR_START='___ctors = .;'
CTOR_END='___ctors_end = .;'
DTOR_START='___dtors = .;'
DTOR_END='___dtors_end = .;'
-OTHER_RELOCATING_SECTIONS='.stack 0x30000 : { _stack = .; *(.stack) }'
+STACK_ADDR=0x30000
diff --git a/ld/emulparams/shelf_linux.sh b/ld/emulparams/shelf_linux.sh
index d7b7631..b841bef 100644
--- a/ld/emulparams/shelf_linux.sh
+++ b/ld/emulparams/shelf_linux.sh
@@ -1,14 +1,2 @@
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/shlelf_linux.sh
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) }
-'
diff --git a/ld/emulparams/shl.sh b/ld/emulparams/shl.sh
index 360aac8..5fbb165 100644
--- a/ld/emulparams/shl.sh
+++ b/ld/emulparams/shl.sh
@@ -1,5 +1,2 @@
-SCRIPT_NAME=sh
+. ${srcdir}/emulparams/sh.sh
OUTPUT_FORMAT="coff-shl"
-TEXT_START_ADDR=0x8000
-TARGET_PAGE_SIZE=128
-ARCH=sh
diff --git a/ld/emulparams/shlelf.sh b/ld/emulparams/shlelf.sh
index bb27f86..e19678b 100644
--- a/ld/emulparams/shlelf.sh
+++ b/ld/emulparams/shlelf.sh
@@ -1,17 +1,2 @@
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/shelf.sh
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) }'
diff --git a/ld/emulparams/shlelf_linux.sh b/ld/emulparams/shlelf_linux.sh
index 191def7..875b2f3 100644
--- a/ld/emulparams/shlelf_linux.sh
+++ b/ld/emulparams/shlelf_linux.sh
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# shelf_linux.sh
+
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-sh-linux"
TEXT_START_ADDR=0x400000
@@ -9,6 +12,5 @@ GENERATE_SHLIB_SCRIPT=yes
DATA_START_SYMBOLS='__data_start = . ;';
-OTHER_READWRITE_SECTIONS='
- .note.ABI-tag : { *(.note.ABI-tag) }
-'
+OTHER_READWRITE_SECTIONS="
+ .note.ABI-tag ${RELOCATING-0} : { *(.note.ABI-tag) }"
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 8ccf803..0f3db03 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -33,6 +33,8 @@
# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
# 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 specifying the start address of the next.
@@ -55,6 +57,7 @@
# .sbss .gnu.linkonce.sb.foo
# .sdata2 .gnu.linkonce.s2.foo
# .sbss2 .gnu.linkonce.sb2.foo
+# .debug_info .gnu.linkonce.wi.foo
#
# Each of these can also have corresponding .rel.* and .rela.* sections.
@@ -65,13 +68,13 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI
test -z "${ELFSIZE}" && ELFSIZE=32
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=.
-INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
-PLT=".plt ${RELOCATING-0} : { *(.plt) }"
-DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
-RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }"
-SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }"
-SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }"
-CTOR=".ctors ${CONSTRUCTING-0} :
+INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
+PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
+RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
+SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
@@ -96,8 +99,7 @@ CTOR=".ctors ${CONSTRUCTING-0} :
KEEP (*(.ctors))
${CONSTRUCTING+${CTOR_END}}
}"
-
-DTOR=" .dtors ${CONSTRUCTING-0} :
+DTOR=".dtors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${DTOR_START}}
KEEP (*crtbegin.o(.dtors))
@@ -106,6 +108,11 @@ DTOR=" .dtors ${CONSTRUCTING-0} :
KEEP (*(.dtors))
${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 [ -z "$EMBEDDED" ]; then
@@ -138,12 +145,12 @@ SECTIONS
${CREATE_SHLIB-${INTERP}}
${INITIAL_READONLY_SECTIONS}
${TEXT_DYNAMIC+${DYNAMIC}}
- .hash ${RELOCATING-0} : { *(.hash) }
- .dynsym ${RELOCATING-0} : { *(.dynsym) }
- .dynstr ${RELOCATING-0} : { *(.dynstr) }
- .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
- .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
- .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
+ .hash ${RELOCATING-0} : { *(.hash) }
+ .dynsym ${RELOCATING-0} : { *(.dynsym) }
+ .dynstr ${RELOCATING-0} : { *(.dynstr) }
+ .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
+ .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
+ .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
EOF
if [ "x$COMBRELOC" = x ]; then
@@ -152,124 +159,44 @@ else
COMBRELOCCAT="cat > $COMBRELOC"
fi
eval $COMBRELOCCAT <<EOF
- .rel.init ${RELOCATING-0} : { *(.rel.init) }
- .rela.init ${RELOCATING-0} : { *(.rela.init) }
- .rel.text ${RELOCATING-0} :
- {
- *(.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) }
- .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
- .rel.rodata ${RELOCATING-0} :
- {
- *(.rel.rodata)
- ${RELOCATING+*(.rel.rodata.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.r.*)}
- }
- .rela.rodata ${RELOCATING-0} :
- {
- *(.rela.rodata)
- ${RELOCATING+*(.rela.rodata.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.r.*)}
- }
+ .rel.init ${RELOCATING-0} : { *(.rel.init) }
+ .rela.init ${RELOCATING-0} : { *(.rela.init) }
+ .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.fini ${RELOCATING-0} : { *(.rel.fini) }
+ .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
+ .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.*}) }
${OTHER_READONLY_RELOC_SECTIONS}
- .rel.data ${RELOCATING-0} :
- {
- *(.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) }
- .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
- .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
- .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
- .rel.got ${RELOCATING-0} : { *(.rel.got) }
- .rela.got ${RELOCATING-0} : { *(.rela.got) }
+ .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.ctors ${RELOCATING-0} : { *(.rel.ctors) }
+ .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
+ .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
+ .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
+ .rel.got ${RELOCATING-0} : { *(.rel.got) }
+ .rela.got ${RELOCATING-0} : { *(.rela.got) }
${OTHER_GOT_RELOC_SECTIONS}
- .rel.sdata ${RELOCATING-0} :
- {
- *(.rel.sdata)
- ${RELOCATING+*(.rel.sdata.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.s.*)}
- }
- .rela.sdata ${RELOCATING-0} :
- {
- *(.rela.sdata)
- ${RELOCATING+*(.rela.sdata.*)}
- ${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.*)}
- }
+ .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.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
+ .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }
+ .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.*}) }
+ .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.*}) }
+ .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
+ .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
EOF
if [ -n "$COMBRELOC" ]; then
cat <<EOF
- .rel.dyn :
+ .rel.dyn ${RELOCATING-0} :
{
EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF
}
- .rela.dyn :
+ .rela.dyn ${RELOCATING-0} :
{
EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
@@ -278,11 +205,11 @@ cat <<EOF
EOF
fi
cat <<EOF
- .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
- .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
+ .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
+ .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
${OTHER_PLT_RELOC_SECTIONS}
- .init ${RELOCATING-0} :
+ .init ${RELOCATING-0} :
{
${RELOCATING+${INIT_START}}
KEEP (*(.init))
@@ -290,18 +217,15 @@ cat <<EOF
} =${NOP-0}
${DATA_PLT-${BSS_PLT-${PLT}}}
- .text ${RELOCATING-0} :
+ .text ${RELOCATING-0} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
- *(.text)
- ${RELOCATING+*(.text.*)}
- *(.stub)
+ *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
- ${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
- .fini ${RELOCATING-0} :
+ .fini ${RELOCATING-0} :
{
${RELOCATING+${FINI_START}}
KEEP (*(.fini))
@@ -311,94 +235,86 @@ cat <<EOF
${RELOCATING+PROVIDE (_etext = .);}
${RELOCATING+PROVIDE (etext = .);}
${WRITABLE_RODATA-${RODATA}}
- .rodata1 ${RELOCATING-0} : { *(.rodata1) }
+ .rodata1 ${RELOCATING-0} : { *(.rodata1) }
${CREATE_SHLIB-${SDATA2}}
${CREATE_SHLIB-${SBSS2}}
- ${RELOCATING+${OTHER_READONLY_SECTIONS}}
+ ${OTHER_READONLY_SECTIONS}
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
- .data ${RELOCATING-0} :
+ .data ${RELOCATING-0} :
{
${RELOCATING+${DATA_START_SYMBOLS}}
- *(.data)
- ${RELOCATING+*(.data.*)}
- ${RELOCATING+*(.gnu.linkonce.d.*)}
+ *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
${CONSTRUCTING+SORT(CONSTRUCTORS)}
}
- .data1 ${RELOCATING-0} : { *(.data1) }
- .eh_frame : { KEEP (*(.eh_frame)) }
- .gcc_except_table : { *(.gcc_except_table) }
+ .data1 ${RELOCATING-0} : { *(.data1) }
+ .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) }
+ .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) }
${WRITABLE_RODATA+${RODATA}}
- ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
+ ${OTHER_READWRITE_SECTIONS}
${TEXT_DYNAMIC-${DYNAMIC}}
${RELOCATING+${CTOR}}
${RELOCATING+${DTOR}}
- .jcr : { KEEP (*(.jcr)) }
+ .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
${DATA_PLT+${PLT}}
${RELOCATING+${OTHER_GOT_SYMBOLS}}
- .got ${RELOCATING-0} : { *(.got.plt) *(.got) }
- ${RELOCATING+${OTHER_GOT_SECTIONS}}
+ .got ${RELOCATING-0} : { *(.got.plt) *(.got) }
+ ${OTHER_GOT_SECTIONS}
${CREATE_SHLIB+${SDATA2}}
${CREATE_SHLIB+${SBSS2}}
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} :
+ .sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
- *(.sdata)
- ${RELOCATING+*(.sdata.*)}
- ${RELOCATING+*(.gnu.linkonce.s.*)}
+ *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
}
- ${RELOCATING+${OTHER_SDATA_SECTIONS}}
+ ${OTHER_SDATA_SECTIONS}
${RELOCATING+_edata = .;}
${RELOCATING+PROVIDE (edata = .);}
${RELOCATING+__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
- .sbss ${RELOCATING-0} :
+ .sbss ${RELOCATING-0} :
{
${RELOCATING+PROVIDE (__sbss_start = .);}
${RELOCATING+PROVIDE (___sbss_start = .);}
*(.dynsbss)
- *(.sbss)
- ${RELOCATING+*(.sbss.*)}
- ${RELOCATING+*(.gnu.linkonce.sb.*)}
+ *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
*(.scommon)
${RELOCATING+PROVIDE (__sbss_end = .);}
${RELOCATING+PROVIDE (___sbss_end = .);}
}
${BSS_PLT+${PLT}}
- .bss ${RELOCATING-0} :
+ .bss ${RELOCATING-0} :
{
*(.dynbss)
- *(.bss)
- ${RELOCATING+*(.bss.*)}
- ${RELOCATING+*(.gnu.linkonce.b.*)}
+ *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */
${RELOCATING+. = ALIGN(${ALIGNMENT});}
}
- ${RELOCATING+${OTHER_BSS_SECTIONS}}
+ ${OTHER_BSS_SECTIONS}
${RELOCATING+. = ALIGN(${ALIGNMENT});}
${RELOCATING+_end = .;}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
${RELOCATING+PROVIDE (end = .);}
/* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
+ .comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
@@ -417,7 +333,7 @@ cat <<EOF
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
- .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
@@ -431,9 +347,8 @@ cat <<EOF
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
- ${RELOCATING+${OTHER_RELOCATING_SECTIONS}}
-
- /* These must appear regardless of ${RELOCATING}. */
+ ${STACK_ADDR+${STACK}}
${OTHER_SECTIONS}
+ ${RELOCATING+${OTHER_END_SYMBOLS}}
}
EOF
diff --git a/ld/scripttempl/elfi370.sc b/ld/scripttempl/elfi370.sc
index 39bf8a1..6b390fe 100644
--- a/ld/scripttempl/elfi370.sc
+++ b/ld/scripttempl/elfi370.sc
@@ -92,7 +92,7 @@ SECTIONS
${RELOCATING+PROVIDE (etext = .);}
${CREATE_SHLIB-${SDATA2}}
${CREATE_SHLIB-${SBSS2}}
- ${RELOCATING+${OTHER_READONLY_SECTIONS}}
+ ${OTHER_READONLY_SECTIONS}
/* 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
@@ -118,7 +118,7 @@ SECTIONS
${CONSTRUCTING+CONSTRUCTORS}
}
.data1 ${RELOCATING-0} : { *(.data1) }
- ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
+ ${OTHER_READWRITE_SECTIONS}
.got1 ${RELOCATING-0} : { *(.got1) }
.dynamic ${RELOCATING-0} : { *(.dynamic) }
@@ -212,7 +212,6 @@ SECTIONS
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
- /* These must appear regardless of ${RELOCATING}. */
${OTHER_SECTIONS}
}
EOF
diff --git a/ld/scripttempl/nw.sc b/ld/scripttempl/nw.sc
index 4a0b051..3fb9bce 100644
--- a/ld/scripttempl/nw.sc
+++ b/ld/scripttempl/nw.sc
@@ -87,7 +87,7 @@ SECTIONS
.dtors ${RELOCATING-0} : { *(.dtors) }
.rodata ${RELOCATING-0} : { *(.rodata) }
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
- ${RELOCATING+${OTHER_READONLY_SECTIONS}}
+ ${OTHER_READONLY_SECTIONS}
/* Read-write section, merged into data segment: */
${RELOCATING+. = ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};}
@@ -98,7 +98,7 @@ SECTIONS
${CONSTRUCTING+CONSTRUCTORS}
}
.data1 ${RELOCATING-0} : { *(.data1) }
- ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
+ ${OTHER_READWRITE_SECTIONS}
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
.dynamic ${RELOCATING-0} : { *(.dynamic) }
${DATA_PLT+${PLT}}
@@ -125,7 +125,6 @@ SECTIONS
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
- /* These must appear regardless of ${RELOCATING}. */
${OTHER_SECTIONS}
}
EOF