summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/ld
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-07-05 20:16:34 +0000
committerobrien <obrien@FreeBSD.org>2002-07-05 20:16:34 +0000
commitf3c54bd2c1850601b80aa0558b8843517125f50f (patch)
tree30918b465d458ef1aca113937ad46b1e912ce044 /contrib/binutils/ld
parent18ff9f4f1bddd11c341a37177885ac89fcccedd9 (diff)
downloadFreeBSD-src-f3c54bd2c1850601b80aa0558b8843517125f50f.zip
FreeBSD-src-f3c54bd2c1850601b80aa0558b8843517125f50f.tar.gz
Import of Binutils from the FSF 2.12 branch (just post-.1 release).
These bits are taken from the FSF anoncvs repo on 22-June-2002 23:28:00 EDT.
Diffstat (limited to 'contrib/binutils/ld')
-rw-r--r--contrib/binutils/ld/ChangeLog36
-rw-r--r--contrib/binutils/ld/Makefile.am23
-rw-r--r--contrib/binutils/ld/Makefile.in23
-rw-r--r--contrib/binutils/ld/configure.host7
-rw-r--r--contrib/binutils/ld/emulparams/elf64_s390.sh11
-rw-r--r--contrib/binutils/ld/emulparams/elf_s390.sh10
-rw-r--r--contrib/binutils/ld/emultempl/armelf.em7
-rw-r--r--contrib/binutils/ld/emultempl/ppc64elf.em5
-rw-r--r--contrib/binutils/ld/ld.12
-rw-r--r--contrib/binutils/ld/ld.texinfo2
-rw-r--r--contrib/binutils/ld/ldlang.c2
11 files changed, 123 insertions, 5 deletions
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog
index 0848b49..6f6e0d3f 100644
--- a/contrib/binutils/ld/ChangeLog
+++ b/contrib/binutils/ld/ChangeLog
@@ -1,3 +1,39 @@
+2002-05-09 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline.
+ 2002-05-02 Alan Modra <amodra@bigpond.net.au>
+ * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
+ Adjust for ppc64_elf_set_toc change. #include libbfd.h.
+
+ 2002-04-28 Alan Modra <amodra@bigpond.net.au>
+ * Makefile.am (mpw): New maintainer mode rule to make mpw-*.c files.
+ * Makefile.in: Regenerate.
+ * mpw-elfmips.c: Delete.
+ * mpw-eppcmac.c: Delete.
+ * mpw-esh.c: Delete.
+ * mpw-idtmips.c: Delete.
+
+2002-04-27 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline
+ 2002-04-08 Alan Modra <amodra@bigpond.net.au>
+ * ldlang.c (lang_size_sections): Don't complain about
+ SEC_NEVER_LOAD sections having no memory region specified.
+ * ld.texinfo (Format Commands <OUTPUT_FORMAT>): Typo fix.
+
+ 2002-04-07 matthew green <mrg@redhat.com>
+ * ld/configure.host (*-*-netbsd*): Add support for NetBSD/ELF.
+
+ 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
+ * emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
+ * emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".
+
+2002-04-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Add 'n' in order
+ to prevent "-n" from being taken as an abbreviation for
+ "--no-pipeline-knowledge".
+
2002-04-04 Alan Modra <amodra@bigpond.net.au>
* dep-in.sed: Cope with absolute paths.
diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am
index 3959ac5..595228a 100644
--- a/contrib/binutils/ld/Makefile.am
+++ b/contrib/binutils/ld/Makefile.am
@@ -1196,6 +1196,29 @@ dep-am: DEP
.PHONY: dep dep-in dep-am
+@MAINT@.PHONY: mpw
+@MAINT@mpw: $(srcdir)/mpw-ei386go32.c $(srcdir)/mpw-elfmips.c \
+@MAINT@ $(srcdir)/mpw-em68kcoff.c $(srcdir)/mpw-eppcmac.c \
+@MAINT@ $(srcdir)/mpw-esh.c $(srcdir)/mpw-idtmips.c
+@MAINT@
+@MAINT@$(srcdir)/mpw-ei386go32.c: ei386go32.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+@MAINT@
+@MAINT@$(srcdir)/mpw-elfmips.c: eelf32ebmip.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+@MAINT@
+@MAINT@$(srcdir)/mpw-em68kcoff.c: em68kcoff.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+@MAINT@
+@MAINT@$(srcdir)/mpw-eppcmac.c: eppcmacos.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+@MAINT@
+@MAINT@$(srcdir)/mpw-esh.c: esh.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+@MAINT@
+@MAINT@$(srcdir)/mpw-idtmips.c: emipsidt.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in
index 1521f5e..3a652fe 100644
--- a/contrib/binutils/ld/Makefile.in
+++ b/contrib/binutils/ld/Makefile.in
@@ -1891,6 +1891,29 @@ dep-am: DEP
.PHONY: dep dep-in dep-am
+@MAINT@.PHONY: mpw
+@MAINT@mpw: $(srcdir)/mpw-ei386go32.c $(srcdir)/mpw-elfmips.c \
+@MAINT@ $(srcdir)/mpw-em68kcoff.c $(srcdir)/mpw-eppcmac.c \
+@MAINT@ $(srcdir)/mpw-esh.c $(srcdir)/mpw-idtmips.c
+@MAINT@
+@MAINT@$(srcdir)/mpw-ei386go32.c: ei386go32.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+@MAINT@
+@MAINT@$(srcdir)/mpw-elfmips.c: eelf32ebmip.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+@MAINT@
+@MAINT@$(srcdir)/mpw-em68kcoff.c: em68kcoff.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+@MAINT@
+@MAINT@$(srcdir)/mpw-eppcmac.c: eppcmacos.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+@MAINT@
+@MAINT@$(srcdir)/mpw-esh.c: esh.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+@MAINT@
+@MAINT@$(srcdir)/mpw-idtmips.c: emipsidt.c
+@MAINT@ $(srcdir)/../move-if-change $< $@
+
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
diff --git a/contrib/binutils/ld/configure.host b/contrib/binutils/ld/configure.host
index 56a950c..65c2fc7 100644
--- a/contrib/binutils/ld/configure.host
+++ b/contrib/binutils/ld/configure.host
@@ -223,6 +223,13 @@ x86_64-*-linux-gnu*)
*-*-linux*)
;;
+*-*-netbsd*)
+ NATIVE_LIB_DIRS=/usr/lib
+ # NetBSD typically does not use the GCC crtstuff, so ignore it.
+ HOSTING_CRT0='-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crtbegin.o'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` /usr/lib/crtend.o'
+ ;;
+
alpha*-*-*)
HOSTING_CRT0=/usr/ccs/lib/crt0.o
NATIVE_LIB_DIRS=/usr/ccs/lib
diff --git a/contrib/binutils/ld/emulparams/elf64_s390.sh b/contrib/binutils/ld/emulparams/elf64_s390.sh
new file mode 100644
index 0000000..8416c89
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf64_s390.sh
@@ -0,0 +1,11 @@
+SCRIPT_NAME=elf
+ELFSIZE=64
+OUTPUT_FORMAT="elf64-s390"
+TEXT_START_ADDR=0x80000000
+MAXPAGESIZE=0x1000
+NONPAGED_TEXT_START_ADDR=0x80000000
+ARCH="s390:64-bit"
+MACHINE=
+NOP=0x07070707
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/elf_s390.sh b/contrib/binutils/ld/emulparams/elf_s390.sh
new file mode 100644
index 0000000..2804ace
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf_s390.sh
@@ -0,0 +1,10 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-s390"
+TEXT_START_ADDR=0x00400000
+MAXPAGESIZE=0x1000
+NONPAGED_TEXT_START_ADDR=0x00400000
+ARCH="s390:31-bit"
+MACHINE=
+NOP=0x07070707
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emultempl/armelf.em b/contrib/binutils/ld/emultempl/armelf.em
index c570486..78a0c35 100644
--- a/contrib/binutils/ld/emultempl/armelf.em
+++ b/contrib/binutils/ld/emultempl/armelf.em
@@ -156,7 +156,12 @@ PARSE_AND_LIST_PROLOGUE='
#define OPTION_THUMB_ENTRY 301
'
-PARSE_AND_LIST_SHORTOPTS=p
+# Note we add 'n' to the short option list in order to prevent
+# getopt_long_only from thinking that -n is a unique abbreviation
+# for --no-pipeline-knowledge. There is no case to handle 'n' here
+# however, so instead it will be passed back to parse_args() in
+# lexsup.c where it will be handled.
+PARSE_AND_LIST_SHORTOPTS=pn
PARSE_AND_LIST_LONGOPTS='
{ "no-pipeline-knowledge", no_argument, NULL, '\'p\''},
diff --git a/contrib/binutils/ld/emultempl/ppc64elf.em b/contrib/binutils/ld/emultempl/ppc64elf.em
index 27b20ce..2128fe7 100644
--- a/contrib/binutils/ld/emultempl/ppc64elf.em
+++ b/contrib/binutils/ld/emultempl/ppc64elf.em
@@ -23,6 +23,7 @@
#
cat >>e${EMULATION_NAME}.c <<EOF
+#include "libbfd.h"
#include "elf64-ppc.h"
static int need_laying_out = 0;
@@ -35,8 +36,8 @@ static void gld${EMULATION_NAME}_finish PARAMS ((void));
static void
gld${EMULATION_NAME}_after_allocation ()
{
- if (!ppc64_elf_set_toc (output_bfd, &link_info))
- einfo ("%X%P: can not set TOC base: %E\n");
+ if (!link_info.relocateable)
+ _bfd_set_gp_value (output_bfd, ppc64_elf_toc (output_bfd));
}
/* Final emulation specific call. PowerPC64 has 24 byte .plt entries,
diff --git a/contrib/binutils/ld/ld.1 b/contrib/binutils/ld/ld.1
index 1c8f858..272a133 100644
--- a/contrib/binutils/ld/ld.1
+++ b/contrib/binutils/ld/ld.1
@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "LD 1"
-.TH LD 1 "2002-03-08" "binutils-2.12" "GNU Development Tools"
+.TH LD 1 "2002-05-11" "binutils-2.12.1" "GNU Development Tools"
.UC
.SH "NAME"
ld \- Using \s-1LD\s0, the \s-1GNU\s0 linker
diff --git a/contrib/binutils/ld/ld.texinfo b/contrib/binutils/ld/ld.texinfo
index 936bf39..dee9874 100644
--- a/contrib/binutils/ld/ld.texinfo
+++ b/contrib/binutils/ld/ld.texinfo
@@ -2277,7 +2277,7 @@ A couple of linker script commands deal with object file formats.
@cindex output file format in linker script
The @code{OUTPUT_FORMAT} command names the BFD format to use for the
output file (@pxref{BFD}). Using @code{OUTPUT_FORMAT(@var{bfdname})} is
-exactly like using @samp{-oformat @var{bfdname}} on the command line
+exactly like using @samp{--oformat @var{bfdname}} on the command line
(@pxref{Options,,Command Line Options}). If both are used, the command
line option takes precedence.
diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c
index 5257547..414a034 100644
--- a/contrib/binutils/ld/ldlang.c
+++ b/contrib/binutils/ld/ldlang.c
@@ -2914,6 +2914,8 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
defined, issue a warning. */
if ((bfd_get_section_flags (output_bfd, os->bfd_section)
& (SEC_ALLOC | SEC_LOAD)) != 0
+ && (bfd_get_section_flags (output_bfd, os->bfd_section)
+ & SEC_NEVER_LOAD) == 0
&& ! link_info.relocateable
&& strcmp (os->region->name, "*default*") == 0
&& lang_memory_region_list != NULL
OpenPOWER on IntegriCloud