summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/ld
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.25/ld')
-rw-r--r--binutils-2.25/ld/.gitignore16
-rw-r--r--binutils-2.25/ld/ChangeLog60
-rw-r--r--binutils-2.25/ld/Makefile.am2
-rw-r--r--binutils-2.25/ld/Makefile.in4
-rw-r--r--binutils-2.25/ld/config.in3
-rwxr-xr-xbinutils-2.25/ld/configure40
-rw-r--r--binutils-2.25/ld/configure.ac10
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/emulparams/aarch64elf32.sh0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/emulparams/aarch64elf32b.sh0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/emulparams/aarch64linux32.sh0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/emulparams/aarch64linux32b.sh0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/emulparams/elf32lppclinux.sh0
-rw-r--r--binutils-2.25/ld/emulparams/elf_x86_64.sh5
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/emulparams/nios2linux.sh0
-rw-r--r--binutils-2.25/ld/emultempl/elf32.em15
-rw-r--r--binutils-2.25/ld/emultempl/lnk960.em66
-rw-r--r--binutils-2.25/ld/emultempl/spu_icache.o_c50
-rw-r--r--binutils-2.25/ld/emultempl/spu_ovl.o_c44
-rw-r--r--binutils-2.25/ld/ld.h7
-rw-r--r--binutils-2.25/ld/ld.texinfo21
-rw-r--r--binutils-2.25/ld/ldexp.c8
-rw-r--r--binutils-2.25/ld/ldfile.c20
-rw-r--r--binutils-2.25/ld/ldlang.c187
-rw-r--r--binutils-2.25/ld/ldlang.h8
-rw-r--r--binutils-2.25/ld/ldlex.h3
-rw-r--r--binutils-2.25/ld/ldmain.c7
-rw-r--r--binutils-2.25/ld/lexsup.c24
-rw-r--r--binutils-2.25/ld/scripttempl/avrtiny.sc60
-rw-r--r--binutils-2.25/ld/scripttempl/elf.sc3
-rw-r--r--binutils-2.25/ld/testsuite/ChangeLog82
-rw-r--r--binutils-2.25/ld/testsuite/ld-arm/attr-merge-2.attr1
-rw-r--r--binutils-2.25/ld/testsuite/ld-arm/attr-merge-2a.s1
-rw-r--r--binutils-2.25/ld/testsuite/ld-arm/attr-merge-2b.s1
-rw-r--r--binutils-2.25/ld/testsuite/ld-arm/attr-merge-4.attr2
-rw-r--r--binutils-2.25/ld/testsuite/ld-arm/attr-merge-4a.s3
-rw-r--r--binutils-2.25/ld/testsuite/ld-arm/attr-merge-4b.s3
-rw-r--r--binutils-2.25/ld/testsuite/ld-arm/attr-merge-6.attr1
-rw-r--r--binutils-2.25/ld/testsuite/ld-arm/attr-merge-6a.s2
-rw-r--r--binutils-2.25/ld/testsuite/ld-arm/attr-merge-6b.s2
-rw-r--r--binutils-2.25/ld/testsuite/ld-avr/relax-02.d64
-rw-r--r--binutils-2.25/ld/testsuite/ld-avr/relax-02.s65
-rw-r--r--binutils-2.25/ld/testsuite/ld-avr/relax-03.d26
-rw-r--r--binutils-2.25/ld/testsuite/ld-avr/relax-03.s18
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/testsuite/ld-pe/longsecn-1.d0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/testsuite/ld-pe/longsecn-2.d0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/testsuite/ld-pe/longsecn-3.d0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/testsuite/ld-pe/longsecn-4.d0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/testsuite/ld-pe/longsecn-5.d0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/testsuite/ld-pe/longsecn.d0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/testsuite/ld-pe/non-c-lang-syms.s0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/testsuite/ld-pe/pe-compile.exp0
-rwxr-xr-x[-rw-r--r--]binutils-2.25/ld/testsuite/ld-pe/pe-run.exp0
-rw-r--r--binutils-2.25/ld/testsuite/ld-unique/unique.exp2
-rw-r--r--binutils-2.25/ld/testsuite/ld-unique/unique.s2
-rw-r--r--binutils-2.25/ld/testsuite/ld-unique/unique_shared.s2
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-1.d2
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-2.d2
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/bnd-plt-1.d18
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.d6
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.s5
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx.exp15
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx1a.rd2
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx1c.rd2
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx2a.rd2
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx2c.rd2
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx3.dd35
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx3a.s16
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx3b.s11
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx4.dd24
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx4a.s6
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/mpx4b.s5
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/start.obin0 -> 824 bytes
-rw-r--r--binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp1
-rw-r--r--binutils-2.25/ld/testsuite/lib/ld-lib.exp9
74 files changed, 618 insertions, 485 deletions
diff --git a/binutils-2.25/ld/.gitignore b/binutils-2.25/ld/.gitignore
new file mode 100644
index 00000000..a345bfbc
--- /dev/null
+++ b/binutils-2.25/ld/.gitignore
@@ -0,0 +1,16 @@
+/configdoc.texi
+/deffilep.c
+/deffilep.h
+/ld-new
+/ld.1
+/ldemul-list.h
+/ldgram.c
+/ldgram.h
+/ldlex.c
+/stringify.sed
+/tdirs
+
+/e*.c
+
+/ldscripts
+/tmpdir
diff --git a/binutils-2.25/ld/ChangeLog b/binutils-2.25/ld/ChangeLog
index 5aebb9c1..d3a348aa 100644
--- a/binutils-2.25/ld/ChangeLog
+++ b/binutils-2.25/ld/ChangeLog
@@ -1,42 +1,66 @@
-2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com>
+2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
- * emulparams/elf_x86_64.sh (BNDPLT): Set to yes for x86_64.
- * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
- "-z bndplt" if BNDPLT is yes.
- (gld${EMULATION_NAME}_list_options): Add "-z bndplt" entry.
- * ld.texinfo: Add description for bndplt.
+ * emultempl/aarch64elf.em
+ (aarch64_elf_create_output_section_statements): Add parameter in
+ bfd_elf${ELFSIZE}_aarch64_set_options call.
+ (OPTION_FIX_ERRATUM_843419): Define.
+ (PARSE_AND_LIST_LONGOPTS): Add fix-cortex-a53-843419.
+ (PARSE_AND_LIST_ARGS_CASES): Add OPTION_FIX_ERRATUM_843419.
-2014-10-29 Nick Clifton <nickc@redhat.com>
+2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
- * po/bg.po: Updated Bulgarian translation.
+ * emultempl/aarch64elf.em (_aarch64_add_stub_section): Set section
+ alignment to 2.
-2014-10-28 Alan Modra <amodra@gmail.com>
+2014-10-08 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
- Apply trunk patches
- 2014-10-16 Alan Modra <amodra@gmail.com>
- PR 17488
- * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Don't attempt
- to access ELF header e_flags when not ppc64 ELF output.
+ * avrtiny.sc: Apply avr.sc fixes.
+
+2014-11-04 Alan Modra <amodra@gmail.com>
+
+ * emultempl/spu_icache.o_c: Regenerate.
+ * emultempl/spu_ovl.o_c: Regenerate.
+
+2014-11-03 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * testsuite/ld-avr/relax-02.d: Update to check size of symbols has
+ changed.
+ * testsuite/ld-avr/relax-03.d: Likewise.
+
+2014-11-03 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * testsuite/ld-avr/relax-02.d: New file.
+ * testsuite/ld-avr/relax-02.s: New file.
+ * testsuite/ld-avr/relax-03.d: New file.
+ * testsuite/ld-avr/relax-03.s: New file.
+
+2014-10-29 Nick Clifton <nickc@redhat.com>
+
+ * po/bg.po: Updated Bulgarian translation.
2014-10-24 Tejas Belagod <tejas.belagod@arm.com>
- * emultempl/aarch64elf.em: Add command-line option for erratum
- 835769.
+ * emultempl/aarch64elf.em: Add command-line option for erratum 835769.
2014-10-17 Hans-Peter Nilsson <hp@axis.com>
- Backport "implement --print-sysroot in ld" from master
+ Implement --print-sysroot in ld.
* ldlex.h (enum option_values): Add entry OPTION_PRINT_SYSROOT.
* lexsup.c (ld_options): Add entry for --print-sysroot.
(parse_args) <OPTION_PRINT_SYSROOT>: Print sysroot and exit early.
+2014-10-16 Alan Modra <amodra@gmail.com>
+
+ PR 17488
+ * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Don't attempt
+ to access ELF header e_flags when not ppc64 ELF output.
+
2014-10-15 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
2014-10-15 Hans-Peter Nilsson <hp@axis.com>
- Backport "="-ldscript-path-prefix changes from master.
* ldlex.l (INPUTLIST): New start condition.
(comment pattern, ",", "(", ")", "AS_NEEDED")
({FILENAMECHAR1}{FILENAMECHAR}*, "-l"{FILENAMECHAR}+)
diff --git a/binutils-2.25/ld/Makefile.am b/binutils-2.25/ld/Makefile.am
index 9575f1f4..eb5df446 100644
--- a/binutils-2.25/ld/Makefile.am
+++ b/binutils-2.25/ld/Makefile.am
@@ -83,7 +83,7 @@ MANCONF = -Dman
TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
POD2MAN = pod2man --center="GNU Development Tools" \
- --release="binutils-$(VERSION)" --section=1
+ --release="binutils-$(VERSION)" --section=1 --date=" "
#stuff for self hosting (can be overridden in config file).
HOSTING_CRT0 = @HOSTING_CRT0@
diff --git a/binutils-2.25/ld/Makefile.in b/binutils-2.25/ld/Makefile.in
index 9f56ca1f..721b1b1f 100644
--- a/binutils-2.25/ld/Makefile.in
+++ b/binutils-2.25/ld/Makefile.in
@@ -16,7 +16,7 @@
@SET_MAKE@
#
-# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+# Copyright (C) 2012-2015 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -400,7 +400,7 @@ DOCVER = gen
MANCONF = -Dman
TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
POD2MAN = pod2man --center="GNU Development Tools" \
- --release="binutils-$(VERSION)" --section=1
+ --release="binutils-$(VERSION)" --section=1 --date=" "
HOSTING_EMU = -m $(EMUL)
diff --git a/binutils-2.25/ld/config.in b/binutils-2.25/ld/config.in
index 2ab48448..766d23c5 100644
--- a/binutils-2.25/ld/config.in
+++ b/binutils-2.25/ld/config.in
@@ -11,6 +11,9 @@
language is requested. */
#undef ENABLE_NLS
+/* Define to warn for use of native system library directories */
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
+
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
diff --git a/binutils-2.25/ld/configure b/binutils-2.25/ld/configure
index 1047d181..f11e0be9 100755
--- a/binutils-2.25/ld/configure
+++ b/binutils-2.25/ld/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for ld 2.24.90.
+# Generated by GNU Autoconf 2.64 for ld 2.25.51.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ld'
PACKAGE_TARNAME='ld'
-PACKAGE_VERSION='2.24.90'
-PACKAGE_STRING='ld 2.24.90'
+PACKAGE_VERSION='2.25.51'
+PACKAGE_STRING='ld 2.25.51'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -783,6 +783,7 @@ with_lib_path
enable_targets
enable_64_bit_bfd
with_sysroot
+enable_poison_system_directories
enable_gold
enable_got
enable_werror
@@ -1347,7 +1348,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ld 2.24.90 to adapt to many kinds of systems.
+\`configure' configures ld 2.25.51 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1418,7 +1419,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ld 2.24.90:";;
+ short | recursive ) echo "Configuration of ld 2.25.51:";;
esac
cat <<\_ACEOF
@@ -1439,6 +1440,8 @@ Optional Features:
--disable-largefile omit support for large files
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
+ --enable-poison-system-directories
+ warn for use of native system library directories
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
@@ -1541,7 +1544,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ld configure 2.24.90
+ld configure 2.25.51
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2250,7 +2253,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ld $as_me 2.24.90, which was
+It was created by ld $as_me 2.25.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -4059,7 +4062,7 @@ fi
# Define the identity of the package.
PACKAGE='ld'
- VERSION='2.24.90'
+ VERSION='2.25.51'
cat >>confdefs.h <<_ACEOF
@@ -11712,7 +11715,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11715 "configure"
+#line 11718 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11818,7 +11821,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11821 "configure"
+#line 11824 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15466,6 +15469,19 @@ fi
+# Check whether --enable-poison-system-directories was given.
+if test "${enable_poison_system_directories+set}" = set; then :
+ enableval=$enable_poison_system_directories;
+else
+ enable_poison_system_directories=no
+fi
+
+if test "x${enable_poison_system_directories}" = "xyes"; then
+
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
+
+fi
+
# Check whether --enable-gold was given.
if test "${enable_gold+set}" = set; then :
enableval=$enable_gold; case "${enableval}" in
@@ -17594,7 +17610,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ld $as_me 2.24.90, which was
+This file was extended by ld $as_me 2.25.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17658,7 +17674,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-ld config.status 2.24.90
+ld config.status 2.25.51
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/binutils-2.25/ld/configure.ac b/binutils-2.25/ld/configure.ac
index 1bddfc9f..e9edb7ff 100644
--- a/binutils-2.25/ld/configure.ac
+++ b/binutils-2.25/ld/configure.ac
@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot)
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
+AC_ARG_ENABLE([poison-system-directories],
+ AS_HELP_STRING([--enable-poison-system-directories],
+ [warn for use of native system library directories]),,
+ [enable_poison_system_directories=no])
+if test "x${enable_poison_system_directories}" = "xyes"; then
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
+ [1],
+ [Define to warn for use of native system library directories])
+fi
+
dnl Use --enable-gold to decide if this linker should be the default.
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
diff --git a/binutils-2.25/ld/emulparams/aarch64elf32.sh b/binutils-2.25/ld/emulparams/aarch64elf32.sh
index f85c9ffd..f85c9ffd 100644..100755
--- a/binutils-2.25/ld/emulparams/aarch64elf32.sh
+++ b/binutils-2.25/ld/emulparams/aarch64elf32.sh
diff --git a/binutils-2.25/ld/emulparams/aarch64elf32b.sh b/binutils-2.25/ld/emulparams/aarch64elf32b.sh
index aa0a2c54..aa0a2c54 100644..100755
--- a/binutils-2.25/ld/emulparams/aarch64elf32b.sh
+++ b/binutils-2.25/ld/emulparams/aarch64elf32b.sh
diff --git a/binutils-2.25/ld/emulparams/aarch64linux32.sh b/binutils-2.25/ld/emulparams/aarch64linux32.sh
index b84eb451..b84eb451 100644..100755
--- a/binutils-2.25/ld/emulparams/aarch64linux32.sh
+++ b/binutils-2.25/ld/emulparams/aarch64linux32.sh
diff --git a/binutils-2.25/ld/emulparams/aarch64linux32b.sh b/binutils-2.25/ld/emulparams/aarch64linux32b.sh
index e92feecb..e92feecb 100644..100755
--- a/binutils-2.25/ld/emulparams/aarch64linux32b.sh
+++ b/binutils-2.25/ld/emulparams/aarch64linux32b.sh
diff --git a/binutils-2.25/ld/emulparams/elf32lppclinux.sh b/binutils-2.25/ld/emulparams/elf32lppclinux.sh
index 9a56372e..9a56372e 100644..100755
--- a/binutils-2.25/ld/emulparams/elf32lppclinux.sh
+++ b/binutils-2.25/ld/emulparams/elf32lppclinux.sh
diff --git a/binutils-2.25/ld/emulparams/elf_x86_64.sh b/binutils-2.25/ld/emulparams/elf_x86_64.sh
index 1e83a74c..d8cb6bfb 100644
--- a/binutils-2.25/ld/emulparams/elf_x86_64.sh
+++ b/binutils-2.25/ld/emulparams/elf_x86_64.sh
@@ -31,10 +31,7 @@ fi
case "$target" in
x86_64*-linux*|i[3-7]86-*-linux-*)
case "$EMULATION_NAME" in
- *64*)
- LIBPATH_SUFFIX=64
- BNDPLT=yes
- ;;
+ *64*) LIBPATH_SUFFIX=64 ;;
esac
;;
*-*-solaris2*)
diff --git a/binutils-2.25/ld/emulparams/nios2linux.sh b/binutils-2.25/ld/emulparams/nios2linux.sh
index e6542508..e6542508 100644..100755
--- a/binutils-2.25/ld/emulparams/nios2linux.sh
+++ b/binutils-2.25/ld/emulparams/nios2linux.sh
diff --git a/binutils-2.25/ld/emultempl/elf32.em b/binutils-2.25/ld/emultempl/elf32.em
index 137446fe..67c437da 100644
--- a/binutils-2.25/ld/emultempl/elf32.em
+++ b/binutils-2.25/ld/emultempl/elf32.em
@@ -2277,14 +2277,6 @@ fragment <<EOF
link_info.execstack = FALSE;
}
EOF
-
-if test x"$BNDPLT" = xyes; then
-fragment <<EOF
- else if (strcmp (optarg, "bndplt") == 0)
- link_info.bndplt = TRUE;
-EOF
-fi
-
if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
fragment <<EOF
else if (strcmp (optarg, "global") == 0)
@@ -2464,13 +2456,6 @@ fragment <<EOF
EOF
fi
-if test x"$BNDPLT" = xyes; then
-fragment <<EOF
- fprintf (file, _("\
- -z bndplt Always generate BND prefix in PLT entries\n"));
-EOF
-fi
-
if test -n "$PARSE_AND_LIST_OPTIONS" ; then
fragment <<EOF
$PARSE_AND_LIST_OPTIONS
diff --git a/binutils-2.25/ld/emultempl/lnk960.em b/binutils-2.25/ld/emultempl/lnk960.em
index 6364f6df..26be394b 100644
--- a/binutils-2.25/ld/emultempl/lnk960.em
+++ b/binutils-2.25/ld/emultempl/lnk960.em
@@ -129,73 +129,15 @@ lnk960_after_parse (void)
add_on (syslib_list, lang_input_file_is_search_file_enum);
}
-/* Create a symbol with the given name with the value of the
- address of first byte of the section named.
-
- If the symbol already exists, then do nothing. */
-
-static void
-symbol_at_beginning_of (const char *secname, const char *name)
-{
- struct bfd_link_hash_entry *h;
-
- h = bfd_link_hash_lookup (link_info.hash, name, TRUE, TRUE, TRUE);
- if (h == NULL)
- einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
-
- if (h->type == bfd_link_hash_new
- || h->type == bfd_link_hash_undefined)
- {
- asection *sec;
-
- h->type = bfd_link_hash_defined;
-
- sec = bfd_get_section_by_name (link_info.output_bfd, secname);
- if (sec == NULL)
- sec = bfd_abs_section_ptr;
- h->u.def.value = 0;
- h->u.def.section = sec;
- }
-}
-
-/* Create a symbol with the given name with the value of the
- address of the first byte after the end of the section named.
-
- If the symbol already exists, then do nothing. */
-
-static void
-symbol_at_end_of (const char *secname, const char *name)
-{
- struct bfd_link_hash_entry *h;
-
- h = bfd_link_hash_lookup (link_info.hash, name, TRUE, TRUE, TRUE);
- if (h == NULL)
- einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
-
- if (h->type == bfd_link_hash_new
- || h->type == bfd_link_hash_undefined)
- {
- asection *sec;
-
- h->type = bfd_link_hash_defined;
-
- sec = bfd_get_section_by_name (link_info.output_bfd, secname);
- if (sec == NULL)
- sec = bfd_abs_section_ptr;
- h->u.def.value = sec->size;
- h->u.def.section = sec;
- }
-}
-
static void
lnk960_after_allocation (void)
{
if (!link_info.relocatable)
{
- symbol_at_end_of (".text", "_etext");
- symbol_at_end_of (".data", "_edata");
- symbol_at_beginning_of (".bss", "_bss_start");
- symbol_at_end_of (".bss", "_end");
+ lang_abs_symbol_at_end_of (".text", "_etext");
+ lang_abs_symbol_at_end_of (".data", "_edata");
+ lang_abs_symbol_at_beginning_of (".bss", "_bss_start");
+ lang_abs_symbol_at_end_of (".bss", "_end");
}
}
diff --git a/binutils-2.25/ld/emultempl/spu_icache.o_c b/binutils-2.25/ld/emultempl/spu_icache.o_c
index 2006fe25..206615cd 100644
--- a/binutils-2.25/ld/emultempl/spu_icache.o_c
+++ b/binutils-2.25/ld/emultempl/spu_icache.o_c
@@ -1,33 +1,33 @@
0x7f,0x45,0x4c,0x46,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x01,0x00,0x17,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x00,0x00,0x28,
+0x00,0x00,0x00,0xf4,0x00,0x00,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x00,0x00,0x28,
0x00,0x07,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2e,0x73,0x79,
0x6d,0x74,0x61,0x62,0x00,0x2e,0x73,0x74,0x72,0x74,0x61,0x62,0x00,0x2e,0x73,0x68,
0x73,0x74,0x72,0x74,0x61,0x62,0x00,0x2e,0x74,0x65,0x78,0x74,0x00,0x2e,0x64,0x61,
0x74,0x61,0x00,0x2e,0x62,0x73,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x01,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x04,
+0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x01,0x00,0x5f,0x5f,0x69,0x63,0x61,0x63,0x68,
+0x65,0x5f,0x62,0x72,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,0x00,0x5f,0x5f,0x69,
+0x63,0x61,0x63,0x68,0x65,0x5f,0x63,0x61,0x6c,0x6c,0x5f,0x68,0x61,0x6e,0x64,0x6c,
+0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x01,
-0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x03,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x2c,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x04,
-0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x03,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xe0,0x00,0x00,0x00,0x2b,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x01,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x02,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x03,
-0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x01,
-0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x01,
-0x00,0x5f,0x5f,0x69,0x63,0x61,0x63,0x68,0x65,0x5f,0x62,0x72,0x5f,0x68,0x61,0x6e,
-0x64,0x6c,0x65,0x72,0x00,0x5f,0x5f,0x69,0x63,0x61,0x63,0x68,0x65,0x5f,0x63,0x61,
-0x6c,0x6c,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,
+0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x34,
+0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,
+0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,
+0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,
+0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x00,0x00,0x00,0x2b,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
diff --git a/binutils-2.25/ld/emultempl/spu_ovl.o_c b/binutils-2.25/ld/emultempl/spu_ovl.o_c
index c9eff93f..3e445ea5 100644
--- a/binutils-2.25/ld/emultempl/spu_ovl.o_c
+++ b/binutils-2.25/ld/emultempl/spu_ovl.o_c
@@ -1,6 +1,6 @@
0x7f,0x45,0x4c,0x46,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x01,0x00,0x17,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x02,0x74,0x00,0x00,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x00,0x00,0x28,
+0x00,0x00,0x05,0x08,0x00,0x00,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x00,0x00,0x28,
0x00,0x08,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x01,0x02,0x03,0x10,0x11,0x12,0x13,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x04,0x05,0x06,0x07,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
@@ -39,26 +39,6 @@
0x2e,0x74,0x65,0x78,0x74,0x00,0x2e,0x64,0x61,0x74,0x61,0x00,0x2e,0x62,0x73,0x73,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
-0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
-0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xdc,0x00,0x00,0x00,0x6c,0x00,0x00,0x00,0x06,
-0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x26,
-0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x03,
-0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,
-0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,
-0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xb4,0x00,0x00,0x01,0x50,0x00,0x00,0x00,0x07,
-0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x09,
-0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x04,
-0x00,0x00,0x00,0xd6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
@@ -98,4 +78,24 @@
0x00,0x00,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x54,0x00,0x00,0x0f,0x05,
0xff,0xff,0xff,0xf0,0x00,0x00,0x01,0x78,0x00,0x00,0x13,0x05,0xff,0xff,0xff,0xfc,
0x00,0x00,0x01,0xb0,0x00,0x00,0x0f,0x05,0xff,0xff,0xff,0xf0,0x00,0x00,0x01,0xd8,
-0x00,0x00,0x01,0x05,0x00,0x00,0x01,0xf4,
+0x00,0x00,0x01,0x05,0x00,0x00,0x01,0xf4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x40,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x04,
+0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x9c,0x00,0x00,0x00,0x6c,
+0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x0c,
+0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
+0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x08,
+0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x74,0x00,0x00,0x01,0x50,
+0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x10,
+0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x03,0xc4,0x00,0x00,0x00,0xd6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
diff --git a/binutils-2.25/ld/ld.h b/binutils-2.25/ld/ld.h
index f773ce78..bc7aebb6 100644
--- a/binutils-2.25/ld/ld.h
+++ b/binutils-2.25/ld/ld.h
@@ -161,6 +161,13 @@ typedef struct {
/* If TRUE we'll just print the default output on stdout. */
bfd_boolean print_output_format;
+ /* If TRUE warn for uses of system directories when cross linking. */
+ bfd_boolean warn_poison_system_directories;
+
+ /* If TRUE (default FALSE) give an error for uses of system
+ directories when cross linking instead of a warning. */
+ bfd_boolean error_poison_system_directories;
+
/* Big or little endian as set on command line. */
enum endian_enum endian;
diff --git a/binutils-2.25/ld/ld.texinfo b/binutils-2.25/ld/ld.texinfo
index 43973cc8..eeb055c2 100644
--- a/binutils-2.25/ld/ld.texinfo
+++ b/binutils-2.25/ld/ld.texinfo
@@ -1133,9 +1133,6 @@ Specify a stack size for in an ELF @code{PT_GNU_STACK} segment.
Specifying zero will override any default non-zero sized
@code{PT_GNU_STACK} segment creation.
-@item bndplt
-Always generate BND prefix in PLT entries. Supported for Linux/x86_64.
-
@end table
Other keywords are ignored for Solaris compatibility.
@@ -2212,6 +2209,24 @@ string identifying the original linked file does not change.
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
+
+@kindex --warn-poison-system-directories
+@item --warn-poison-system-directories
+Warn for @option{-L} options using system directories such as
+@file{/usr/lib} when cross linking. This option is intended for use
+in environments that want to detect and reject incorrect link settings.
+
+@kindex --no-warn-poison-system-directories
+@item --no-warn-poison-system-directories
+Do not warn for @option{-L} options using system directories such as
+@file{/usr/lib} when cross linking. This option is intended for use
+in chroot environments when such directories contain the correct
+libraries for the target system rather than the host.
+
+@kindex --error-poison-system-directories
+@item --error-poison-system-directories
+Give an error instead of a warning for @option{-L} options using
+system directories when cross linking.
@end table
@c man end
diff --git a/binutils-2.25/ld/ldexp.c b/binutils-2.25/ld/ldexp.c
index 5c4f8dda..6f4dbeaf 100644
--- a/binutils-2.25/ld/ldexp.c
+++ b/binutils-2.25/ld/ldexp.c
@@ -234,14 +234,10 @@ new_rel (bfd_vma value, asection *section)
static void
new_rel_from_abs (bfd_vma value)
{
- asection *s = expld.section;
-
- if (s == bfd_abs_section_ptr && expld.phase == lang_final_phase_enum)
- s = section_for_dot ();
expld.result.valid_p = TRUE;
- expld.result.value = value - s->vma;
+ expld.result.value = value - expld.section->vma;
expld.result.str = NULL;
- expld.result.section = s;
+ expld.result.section = expld.section;
}
static void
diff --git a/binutils-2.25/ld/ldfile.c b/binutils-2.25/ld/ldfile.c
index 782ed7f0..c36cf611 100644
--- a/binutils-2.25/ld/ldfile.c
+++ b/binutils-2.25/ld/ldfile.c
@@ -114,6 +114,26 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
else
new_dirs->name = xstrdup (name);
+
+ if (command_line.warn_poison_system_directories
+ && (!strncmp (name, "/lib", 4)
+ /* TODO: This check is disabled for now due to a bunch of packages that
+ * use libtool and relink with -L/usr/lib paths (albeit after the right
+ * sysroot path). Once those are fixed we can enable.
+ * We also need to adjust it so it only rejects one or two levels deep.
+ * Gcc's internal paths also live below /usr/lib.
+ * http://crbug.com/488360 */
+ /* || !strncmp (name, "/usr/lib", 8) */
+ || !strncmp (name, "/usr/local/lib", 14)
+ || !strncmp (name, "/usr/X11R6/lib", 14)))
+ {
+ if (command_line.error_poison_system_directories)
+ einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
+ "cross-compilation\n"), name);
+ else
+ einfo (_("%P: warning: library search path \"%s\" is unsafe for "
+ "cross-compilation\n"), name);
+ }
}
/* Try to open a BFD for a lang_input_statement. */
diff --git a/binutils-2.25/ld/ldlang.c b/binutils-2.25/ld/ldlang.c
index c4da07f5..8982aa22 100644
--- a/binutils-2.25/ld/ldlang.c
+++ b/binutils-2.25/ld/ldlang.c
@@ -5295,7 +5295,7 @@ lang_size_sections_1
}
expld.dataseg.relro = exp_dataseg_relro_none;
- /* This symbol may be relative to this section. */
+ /* This symbol is relative to this section. */
if ((tree->type.node_class == etree_provided
|| tree->type.node_class == etree_assign)
&& (tree->assign.dst [0] != '.'
@@ -5518,18 +5518,13 @@ lang_size_sections (bfd_boolean *relax, bfd_boolean check_regions)
expld.dataseg.phase = exp_dataseg_done;
}
-static lang_output_section_statement_type *current_section;
-static lang_assignment_statement_type *current_assign;
-static bfd_boolean prefer_next_section;
-
/* Worker function for lang_do_assignments. Recursiveness goes here. */
static bfd_vma
lang_do_assignments_1 (lang_statement_union_type *s,
lang_output_section_statement_type *current_os,
fill_type *fill,
- bfd_vma dot,
- bfd_boolean *found_end)
+ bfd_vma dot)
{
for (; s != NULL; s = s->header.next)
{
@@ -5537,7 +5532,7 @@ lang_do_assignments_1 (lang_statement_union_type *s,
{
case lang_constructors_statement_enum:
dot = lang_do_assignments_1 (constructor_list.head,
- current_os, fill, dot, found_end);
+ current_os, fill, dot);
break;
case lang_output_section_statement_enum:
@@ -5545,18 +5540,12 @@ lang_do_assignments_1 (lang_statement_union_type *s,
lang_output_section_statement_type *os;
os = &(s->output_section_statement);
- os->after_end = *found_end;
if (os->bfd_section != NULL && !os->ignored)
{
- if ((os->bfd_section->flags & SEC_ALLOC) != 0)
- {
- current_section = os;
- prefer_next_section = FALSE;
- }
dot = os->bfd_section->vma;
lang_do_assignments_1 (os->children.head,
- os, os->fill, dot, found_end);
+ os, os->fill, dot);
/* .tbss sections effectively have zero size. */
if ((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
@@ -5573,7 +5562,7 @@ lang_do_assignments_1 (lang_statement_union_type *s,
case lang_wild_statement_enum:
dot = lang_do_assignments_1 (s->wild_statement.children.head,
- current_os, fill, dot, found_end);
+ current_os, fill, dot);
break;
case lang_object_symbols_statement_enum:
@@ -5644,19 +5633,6 @@ lang_do_assignments_1 (lang_statement_union_type *s,
break;
case lang_assignment_statement_enum:
- current_assign = &s->assignment_statement;
- if (current_assign->exp->type.node_class != etree_assert)
- {
- const char *p = current_assign->exp->assign.dst;
-
- if (current_os == abs_output_section && p[0] == '.' && p[1] == 0)
- prefer_next_section = TRUE;
-
- while (*p == '_')
- ++p;
- if (strcmp (p, "end") == 0)
- *found_end = TRUE;
- }
exp_fold_tree (s->assignment_statement.exp,
current_os->bfd_section,
&dot);
@@ -5668,7 +5644,7 @@ lang_do_assignments_1 (lang_statement_union_type *s,
case lang_group_statement_enum:
dot = lang_do_assignments_1 (s->group_statement.children.head,
- current_os, fill, dot, found_end);
+ current_os, fill, dot);
break;
case lang_insert_statement_enum:
@@ -5688,89 +5664,10 @@ lang_do_assignments_1 (lang_statement_union_type *s,
void
lang_do_assignments (lang_phase_type phase)
{
- bfd_boolean found_end = FALSE;
-
- current_section = NULL;
- prefer_next_section = FALSE;
expld.phase = phase;
lang_statement_iteration++;
lang_do_assignments_1 (statement_list.head,
- abs_output_section, NULL, 0, &found_end);
-}
-
-/* For an assignment statement outside of an output section statement,
- choose the best of neighbouring output sections to use for values
- of "dot". */
-
-asection *
-section_for_dot (void)
-{
- asection *s;
-
- /* Assignments belong to the previous output section, unless there
- has been an assignment to "dot", in which case following
- assignments belong to the next output section. (The assumption
- is that an assignment to "dot" is setting up the address for the
- next output section.) Except that past the assignment to "_end"
- we always associate with the previous section. This exception is
- for targets like SH that define an alloc .stack or other
- weirdness after non-alloc sections. */
- if (current_section == NULL || prefer_next_section)
- {
- lang_statement_union_type *stmt;
- lang_output_section_statement_type *os;
-
- for (stmt = (lang_statement_union_type *) current_assign;
- stmt != NULL;
- stmt = stmt->header.next)
- if (stmt->header.type == lang_output_section_statement_enum)
- break;
-
- os = &stmt->output_section_statement;
- while (os != NULL
- && !os->after_end
- && (os->bfd_section == NULL
- || (os->bfd_section->flags & SEC_EXCLUDE) != 0
- || bfd_section_removed_from_list (link_info.output_bfd,
- os->bfd_section)))
- os = os->next;
-
- if (current_section == NULL || os == NULL || !os->after_end)
- {
- if (os != NULL)
- s = os->bfd_section;
- else
- s = link_info.output_bfd->section_last;
- while (s != NULL
- && ((s->flags & SEC_ALLOC) == 0
- || (s->flags & SEC_THREAD_LOCAL) != 0))
- s = s->prev;
- if (s != NULL)
- return s;
-
- return bfd_abs_section_ptr;
- }
- }
-
- s = current_section->bfd_section;
-
- /* The section may have been stripped. */
- while (s != NULL
- && ((s->flags & SEC_EXCLUDE) != 0
- || (s->flags & SEC_ALLOC) == 0
- || (s->flags & SEC_THREAD_LOCAL) != 0
- || bfd_section_removed_from_list (link_info.output_bfd, s)))
- s = s->prev;
- if (s == NULL)
- s = link_info.output_bfd->sections;
- while (s != NULL
- && ((s->flags & SEC_ALLOC) == 0
- || (s->flags & SEC_THREAD_LOCAL) != 0))
- s = s->next;
- if (s != NULL)
- return s;
-
- return bfd_abs_section_ptr;
+ abs_output_section, NULL, 0);
}
/* Fix any .startof. or .sizeof. symbols. When the assemblers see the
@@ -5802,8 +5699,8 @@ lang_set_startof (void)
if (h != NULL && h->type == bfd_link_hash_undefined)
{
h->type = bfd_link_hash_defined;
- h->u.def.value = 0;
- h->u.def.section = s;
+ h->u.def.value = bfd_get_section_vma (link_info.output_bfd, s);
+ h->u.def.section = bfd_abs_section_ptr;
}
sprintf (buf, ".sizeof.%s", secname);
@@ -6286,6 +6183,8 @@ lang_add_output (const char *name, int from_script)
}
}
+static lang_output_section_statement_type *current_section;
+
static int
topower (int x)
{
@@ -7100,6 +6999,70 @@ lang_leave_output_section_statement (fill_type *fill, const char *memspec,
pop_stat_ptr ();
}
+/* Create an absolute symbol with the given name with the value of the
+ address of first byte of the section named.
+
+ If the symbol already exists, then do nothing. */
+
+void
+lang_abs_symbol_at_beginning_of (const char *secname, const char *name)
+{
+ struct bfd_link_hash_entry *h;
+
+ h = bfd_link_hash_lookup (link_info.hash, name, TRUE, TRUE, TRUE);
+ if (h == NULL)
+ einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
+
+ if (h->type == bfd_link_hash_new
+ || h->type == bfd_link_hash_undefined)
+ {
+ asection *sec;
+
+ h->type = bfd_link_hash_defined;
+
+ sec = bfd_get_section_by_name (link_info.output_bfd, secname);
+ if (sec == NULL)
+ h->u.def.value = 0;
+ else
+ h->u.def.value = bfd_get_section_vma (link_info.output_bfd, sec);
+
+ h->u.def.section = bfd_abs_section_ptr;
+ }
+}
+
+/* Create an absolute symbol with the given name with the value of the
+ address of the first byte after the end of the section named.
+
+ If the symbol already exists, then do nothing. */
+
+void
+lang_abs_symbol_at_end_of (const char *secname, const char *name)
+{
+ struct bfd_link_hash_entry *h;
+
+ h = bfd_link_hash_lookup (link_info.hash, name, TRUE, TRUE, TRUE);
+ if (h == NULL)
+ einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
+
+ if (h->type == bfd_link_hash_new
+ || h->type == bfd_link_hash_undefined)
+ {
+ asection *sec;
+
+ h->type = bfd_link_hash_defined;
+
+ sec = bfd_get_section_by_name (link_info.output_bfd, secname);
+ if (sec == NULL)
+ h->u.def.value = 0;
+ else
+ h->u.def.value = (bfd_get_section_vma (link_info.output_bfd, sec)
+ + TO_ADDR (sec->size));
+
+ h->u.def.section = bfd_abs_section_ptr;
+ }
+}
+
+
void
lang_statement_append (lang_statement_list_type *list,
lang_statement_union_type *element,
diff --git a/binutils-2.25/ld/ldlang.h b/binutils-2.25/ld/ldlang.h
index 5f6faae5..bab9863d 100644
--- a/binutils-2.25/ld/ldlang.h
+++ b/binutils-2.25/ld/ldlang.h
@@ -163,8 +163,6 @@ typedef struct lang_output_section_statement_struct
unsigned int ignored : 1;
/* If this section should update "dot". Prevents section being ignored. */
unsigned int update_dot : 1;
- /* If this section is after assignment to _end. */
- unsigned int after_end : 1;
/* If this section uses the alignment of its input sections. */
unsigned int align_lma_with_input : 1;
} lang_output_section_statement_type;
@@ -570,6 +568,10 @@ extern void lang_float
extern void lang_leave_output_section_statement
(fill_type *, const char *, lang_output_section_phdr_list *,
const char *);
+extern void lang_abs_symbol_at_end_of
+ (const char *, const char *);
+extern void lang_abs_symbol_at_beginning_of
+ (const char *, const char *);
extern void lang_statement_append
(lang_statement_list_type *, lang_statement_union_type *,
lang_statement_union_type **);
@@ -581,8 +583,6 @@ extern void lang_reset_memory_regions
(void);
extern void lang_do_assignments
(lang_phase_type);
-extern asection *section_for_dot
- (void);
#define LANG_FOR_EACH_INPUT_STATEMENT(statement) \
lang_input_statement_type *statement; \
diff --git a/binutils-2.25/ld/ldlex.h b/binutils-2.25/ld/ldlex.h
index e3e9b247..20edec74 100644
--- a/binutils-2.25/ld/ldlex.h
+++ b/binutils-2.25/ld/ldlex.h
@@ -140,6 +140,9 @@ enum option_values
OPTION_IGNORE_UNRESOLVED_SYMBOL,
OPTION_PUSH_STATE,
OPTION_POP_STATE,
+ OPTION_WARN_POISON_SYSTEM_DIRECTORIES,
+ OPTION_NO_WARN_POISON_SYSTEM_DIRECTORIES,
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
};
/* The initial parser states. */
diff --git a/binutils-2.25/ld/ldmain.c b/binutils-2.25/ld/ldmain.c
index bc24957b..c4e5e152 100644
--- a/binutils-2.25/ld/ldmain.c
+++ b/binutils-2.25/ld/ldmain.c
@@ -266,6 +266,13 @@ main (int argc, char **argv)
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
+ command_line.warn_poison_system_directories =
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
+ TRUE;
+#else
+ FALSE;
+#endif
+ command_line.error_poison_system_directories = FALSE;
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
diff --git a/binutils-2.25/ld/lexsup.c b/binutils-2.25/ld/lexsup.c
index 4812c97b..a47f18e5 100644
--- a/binutils-2.25/ld/lexsup.c
+++ b/binutils-2.25/ld/lexsup.c
@@ -513,6 +513,18 @@ static const struct ld_option ld_options[] =
{ {"pop-state", no_argument, NULL, OPTION_POP_STATE},
'\0', NULL, N_("Pop state of flags governing input file handling"),
TWO_DASHES },
+ { {"warn-poison-system-directories", no_argument, NULL,
+ OPTION_WARN_POISON_SYSTEM_DIRECTORIES},
+ '\0', NULL, N_("Warn for -L options using system directories"),
+ TWO_DASHES },
+ { {"no-warn-poison-system-directories", no_argument, NULL,
+ OPTION_NO_WARN_POISON_SYSTEM_DIRECTORIES},
+ '\0', NULL, N_("Do not warn for -L options using system directories"),
+ TWO_DASHES },
+ { {"error-poison-system-directories", no_argument, NULL,
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
+ '\0', NULL, N_("Give an error for -L options using system directories"),
+ TWO_DASHES },
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1474,6 +1486,18 @@ parse_args (unsigned argc, char **argv)
free (oldp);
}
break;
+
+ case OPTION_WARN_POISON_SYSTEM_DIRECTORIES:
+ command_line.warn_poison_system_directories = TRUE;
+ break;
+
+ case OPTION_NO_WARN_POISON_SYSTEM_DIRECTORIES:
+ command_line.warn_poison_system_directories = FALSE;
+ break;
+
+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
+ command_line.error_poison_system_directories = TRUE;
+ break;
}
}
diff --git a/binutils-2.25/ld/scripttempl/avrtiny.sc b/binutils-2.25/ld/scripttempl/avrtiny.sc
index ab7294b1..70c5d929 100644
--- a/binutils-2.25/ld/scripttempl/avrtiny.sc
+++ b/binutils-2.25/ld/scripttempl/avrtiny.sc
@@ -96,24 +96,29 @@ SECTIONS
KEEP(*(.vectors))
/* For data that needs to reside in the lower 64k of progmem. */
- *(.progmem.gcc*)
- *(.progmem*)
- ${RELOCATING+. = ALIGN(2);}
+ ${RELOCATING+ *(.progmem.gcc*)}
+ /* PR 13812: Placing the trampolines here gives a better chance
+ that they will be in range of the code that uses them. */
+ ${RELOCATING+. = ALIGN(2);}
${CONSTRUCTING+ __trampolines_start = . ; }
/* The jump trampolines for the 16-bit limited relocs will reside here. */
*(.trampolines)
- *(.trampolines*)
+ ${RELOCATING+ *(.trampolines*)}
${CONSTRUCTING+ __trampolines_end = . ; }
+ ${RELOCATING+ *(.progmem*)}
+
+ ${RELOCATING+. = ALIGN(2);}
+
/* For future tablejump instruction arrays for 3 byte pc devices.
We don't relax jump/call instructions within these sections. */
*(.jumptables)
- *(.jumptables*)
+ ${RELOCATING+ *(.jumptables*)}
/* For code that needs to reside in the lower 128k progmem. */
*(.lowtext)
- *(.lowtext*)
+ ${RELOCATING+ *(.lowtext*)}
${CONSTRUCTING+ __ctors_start = . ; }
${CONSTRUCTING+ *(.ctors) }
@@ -148,7 +153,7 @@ SECTIONS
KEEP (*(.init9))
*(.text)
${RELOCATING+. = ALIGN(2);}
- *(.text.*)
+ ${RELOCATING+ *(.text.*)}
${RELOCATING+. = ALIGN(2);}
*(.fini9) /* _exit() starts here. */
KEEP (*(.fini9))
@@ -173,25 +178,24 @@ SECTIONS
${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > text}
- .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
+ .data ${RELOCATING-0} :
{
${RELOCATING+ PROVIDE (__data_start = .) ; }
*(.data)
- KEEP (*(.data))
- *(.data*)
+ ${RELOCATING+ *(.data*)}
*(.rodata) /* We need to include .rodata here if gcc is used */
- *(.rodata*) /* with -fdata-sections. */
+ ${RELOCATING+ *(.rodata*)} /* with -fdata-sections. */
*(.gnu.linkonce.d*)
${RELOCATING+. = ALIGN(2);}
${RELOCATING+ _edata = . ; }
${RELOCATING+ PROVIDE (__data_end = .) ; }
- } ${RELOCATING+ > data}
+ } ${RELOCATING+ > data ${RELOCATING+AT> text}}
- .bss ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))}
+ .bss ${RELOCATING+ ADDR(.data) + SIZEOF (.data)} ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))}
{
${RELOCATING+ PROVIDE (__bss_start = .) ; }
*(.bss)
- *(.bss*)
+ ${RELOCATING+ *(.bss*)}
*(COMMON)
${RELOCATING+ PROVIDE (__bss_end = .) ; }
} ${RELOCATING+ > data}
@@ -232,31 +236,11 @@ SECTIONS
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
-
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
-
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
-
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
+EOF
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
+. $srcdir/scripttempl/DWARF.sc
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
+cat <<EOF
}
EOF
-
diff --git a/binutils-2.25/ld/scripttempl/elf.sc b/binutils-2.25/ld/scripttempl/elf.sc
index 2c73fdcd..27e4e091 100644
--- a/binutils-2.25/ld/scripttempl/elf.sc
+++ b/binutils-2.25/ld/scripttempl/elf.sc
@@ -609,13 +609,12 @@ cat <<EOF
${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
- ${SDATA_GOT+${RELOCATING+${OTHER_GOT_SYMBOLS+. = .; ${OTHER_GOT_SYMBOLS}}}}
+ ${SDATA_GOT+${RELOCATING+${OTHER_GOT_SYMBOLS}}}
${SDATA_GOT+${GOT}}
${SDATA_GOT+${OTHER_GOT_SECTIONS}}
${SDATA}
${OTHER_SDATA_SECTIONS}
${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
- ${RELOCATING+. = .;}
${RELOCATING+${USER_LABEL_PREFIX}__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
${SBSS}
diff --git a/binutils-2.25/ld/testsuite/ChangeLog b/binutils-2.25/ld/testsuite/ChangeLog
index e09af2b4..1526978c 100644
--- a/binutils-2.25/ld/testsuite/ChangeLog
+++ b/binutils-2.25/ld/testsuite/ChangeLog
@@ -1,38 +1,66 @@
-2014-11-18 H.J. Lu <hongjiu.lu@intel.com>
+2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
- * ld-x86-64/mpx.exp: Always run mpx3 and mpx4 tests in 64-bit.
+ * ld-arm/attr-merge-2a.s: Add Tag_ABI_VFP_args.
+ * ld-arm/attr-merge-2b.s: Likewise.
+ * ld-arm/attr-merge-2.attr: Likewise.
+ * ld-arm/attr-merge-4a.s: Add Tag_ABI_FP_number_model and
+ Tag_ABI_VFP_args.
+ * ld-arm/attr-merge-4b.s: Likewise.
+ * ld-arm/attr-merge-4.attr: Likewise.
+ * ld-arm/attr-merge-6a.s: Likewise.
+ * ld-arm/attr-merge-6b.s: Likewise.
+ * ld-arm/attr-merge-6.attr: Add Tag_ABI_FP_number_model.
-2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com>
+2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
- * ld-x86-64/bnd-ifunc-1.d: Add bndplt option.
- * ld-x86-64/bnd-ifunc-2.d: Likewise.
- * ld-x86-64/bnd-plt-1.d: Likewise. Update dissassembly sections.
- * ld-x86-64/mpx.exp: Handle mpx3 and mpx4 tests.
- * ld-x86-64/mpx1a.rd: Remove _BND from relocation name.
- * ld-x86-64/mpx1c.rd: Likewise.
- * ld-x86-64/mpx2a.rd: Likewise.
- * ld-x86-64/mpx2c.rd: Likewise.
- * ld-x86-64/mpx3.dd: New file.
- * ld-x86-64/mpx3a.s: Likewise.
- * ld-x86-64/mpx3b.s: Likewise.
- * ld-x86-64/mpx4.dd: Likewise.
- * ld-x86-64/mpx4a.s: Likewise.
- * ld-x86-64/mpx4b.s: Likewise.
-
-2014-11-10 Matthew Fortune <matthew.fortune@imgtec.com>
-
- Apply trunk patch:
- * ld-mips-elf/abiflags-strip10-ph.d: New file.
- * ld-mips-elf/mips-eld.exp: Run the new test.
+ * ld-aarch64/aarch64-elf.exp: Add erratum843419 test.
+ * ld-aarch64/erratum843419.d: New.
+ * ld-aarch64/erratum843419.s: New.
-2014-11-07 H.J. Lu <hongjiu.lu@intel.com>
+2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * ld-aarch64/erratum835769.d: Adjust for initial branch over stub
+ section.
+ * ld-aarch64/farcall-b.d: Likewise.
+ * ld-aarch64/farcall-bl.d: Likewise.
+ * ld-aarch64/farcall-back.d: Likewise.
+
+2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * ld-aarch64/erratum835769.d: Adjust for removal of padding before
+ 835769 workaround stubs.
+
+2014-11-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/17598
+ * ld-x86-64/x86-64.exp: Run gotplt1.
- Apply trunk patch:
- 2014-11-07 H.J. Lu <hongjiu.lu@intel.com>
+ * ld-x86-64/gotplt1.d: New file.
+ * ld-x86-64/gotplt1.s: Likewise.
+
+2014-11-11 Jiong Wang <jiong.wang@arm.com>
+
+ * lib/ld-lib.exp (run_ld_link_exec_tests): Append board_cflags if gcc
+ driver used as link tool.
+ (run_cc_link_exec_tests): Likewise.
+
+2014-11-07 H.J. Lu <hongjiu.lu@intel.com>
PR ld/17482
* ld-x86-64/tlsie4.dd: Updated.
+2014-11-05 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * ld-mips-elf/abiflags-strip10-ph.d: New file.
+ * ld-mips-elf/mips-eld.exp: Run the new test.
+
+2014-10-30 Will Newton <will.newton@linaro.org>
+
+ * ld-unique/unique.exp: Use a wider glob for matching ARM
+ targets.
+ * ld-unique/unique.s: Use % instead of @ in .type directive.
+ * ld-unique/unique_shared.s: Likewise.
+
2014-10-24 Tejas Belagod <tejas.belagod@arm.com>
* ld-aarch64/aarch64-elf.exp (aarch64elftests): Drive erratum
@@ -42,7 +70,6 @@
2014-10-17 Hans-Peter Nilsson <hp@axis.com>
- Backport from master
* ld-scripts/sysroot-prefix.exp: Log $ld_sysroot. Handle sysroot
== "/" as a separate sysroot-configuration with separable
test-types.
@@ -55,7 +82,6 @@
2014-10-15 Hans-Peter Nilsson <hp@axis.com>
- Backport "="-ldscript-path-prefix changes from master.
* ld-scripts/sysroot-prefix.exp, ld-scripts/sysroot-prefix-x.s,
ld-scripts/sysroot-prefix-y.s: New files.
* lib/ld-lib.exp (check_sysroot_available): New proc.
diff --git a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2.attr b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2.attr
index 578333b2..9f63df46 100644
--- a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2.attr
+++ b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2.attr
@@ -11,4 +11,5 @@ File Attributes
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: small
+ Tag_ABI_VFP_args: VFP registers
Tag_ABI_optimization_goals: Aggressive Debug
diff --git a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2a.s b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2a.s
index 03031634..8a7260ce 100644
--- a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2a.s
+++ b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2a.s
@@ -6,5 +6,6 @@
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
+ .eabi_attribute 28, 3
.eabi_attribute 30, 6
.file "attr-merge-2a.s"
diff --git a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2b.s b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2b.s
index 047890a0..a22776b7 100644
--- a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2b.s
+++ b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-2b.s
@@ -6,6 +6,7 @@
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
+ .eabi_attribute 28, 1
.eabi_attribute 30, 6
.eabi_attribute 18, 4
.file "attr-merge-2b.s"
diff --git a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4.attr b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4.attr
index 75fd0631..f74b0241 100644
--- a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4.attr
+++ b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4.attr
@@ -5,4 +5,6 @@ File Attributes
Tag_CPU_arch_profile: Microcontroller
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
+ Tag_ABI_FP_number_model: IEEE 754
+ Tag_ABI_VFP_args: compatible
Tag_also_compatible_with: v6-M
diff --git a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4a.s b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4a.s
index b5b77bf1..9282fa21 100644
--- a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4a.s
+++ b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4a.s
@@ -5,3 +5,6 @@
@ Tag_also_compatible_with = v6-M
.eabi_attribute Tag_also_compatible_with, "\006\013"
+
+ .eabi_attribute Tag_ABI_FP_number_model, 3
+ .eabi_attribute Tag_ABI_VFP_args, 3
diff --git a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4b.s b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4b.s
index d2eb6de6..2cf68df2 100644
--- a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4b.s
+++ b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-4b.s
@@ -5,3 +5,6 @@
@ Tag_also_compatible_with = v4T
.eabi_attribute Tag_also_compatible_with, "\006\002"
+
+ .eabi_attribute Tag_ABI_FP_number_model, 0
+ .eabi_attribute Tag_ABI_VFP_args, 0
diff --git a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6.attr b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6.attr
index 0af32f77..1ee5d401 100644
--- a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6.attr
+++ b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6.attr
@@ -5,5 +5,6 @@ File Attributes
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
+ Tag_ABI_FP_number_model: IEEE 754
Tag_MPextension_use: Allowed
Tag_Virtualization_use: TrustZone
diff --git a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6a.s b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6a.s
index 056d8c83..0423bbf3 100644
--- a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6a.s
+++ b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6a.s
@@ -1,4 +1,6 @@
.cpu cortex-a9
.fpu softvfp
+ .eabi_attribute 23, 3
+ .eabi_attribute 28, 0
.eabi_attribute 70, 1
.file "attr-merge-6a.s"
diff --git a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6b.s b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6b.s
index b9ef4d27..9383bcc3 100644
--- a/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6b.s
+++ b/binutils-2.25/ld/testsuite/ld-arm/attr-merge-6b.s
@@ -1,3 +1,5 @@
.cpu cortex-a9
.fpu softvfp
+ .eabi_attribute 23, 3
+ .eabi_attribute 28, 3
.file "attr-merge-6b.s"
diff --git a/binutils-2.25/ld/testsuite/ld-avr/relax-02.d b/binutils-2.25/ld/testsuite/ld-avr/relax-02.d
new file mode 100644
index 00000000..c8d9b103
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-avr/relax-02.d
@@ -0,0 +1,64 @@
+#name: AVR relaxation, symbol at end of section.
+#as: -mmcu=avrxmega2 -mlink-relax
+#ld: -mavrxmega2 --relax
+#source: relax-02.s
+#objdump: -tzd
+#target: avr-*-*
+
+.*: file format elf32-avr
+
+SYMBOL TABLE:
+#...
+00000000 l F \.text 0000000a local_start
+0000000a l F \.text 0000000a local_func_1
+00000014 l F \.text 0000000a local_func_2
+0000001e l F \.text 0000000a local_func_3
+00000032 l \.text 00000000 local_end_label
+00000028 g \.text 00000000 dest
+#...
+00000014 g F \.text 0000000a func_2
+#...
+00000000 g F \.text 0000000a _start
+00000032 g \.text 00000000 end_label
+0000000a g F \.text 0000000a func_1
+#...
+0000001e g F \.text 0000000a func_3
+
+
+
+Disassembly of section \.text:
+
+00000000 <_start>:
+ 0: 00 00 nop
+ 2: 00 00 nop
+ 4: 00 00 nop
+ 6: 00 00 nop
+ 8: 00 00 nop
+
+0000000a <func_1>:
+ a: 00 00 nop
+ c: 00 00 nop
+ e: 00 00 nop
+ 10: 00 00 nop
+ 12: 00 00 nop
+
+00000014 <func_2>:
+ 14: 00 00 nop
+ 16: 08 c0 rjmp \.\+16 ; 0x28 <dest>
+ 18: 07 c0 rjmp \.\+14 ; 0x28 <dest>
+ 1a: 06 c0 rjmp \.\+12 ; 0x28 <dest>
+ 1c: 00 00 nop
+
+0000001e <func_3>:
+ 1e: 00 00 nop
+ 20: 00 00 nop
+ 22: 00 00 nop
+ 24: 00 00 nop
+ 26: 00 00 nop
+
+00000028 <dest>:
+ 28: 00 00 nop
+ 2a: 00 00 nop
+ 2c: 00 00 nop
+ 2e: 00 00 nop
+ 30: 00 00 nop
diff --git a/binutils-2.25/ld/testsuite/ld-avr/relax-02.s b/binutils-2.25/ld/testsuite/ld-avr/relax-02.s
new file mode 100644
index 00000000..57fb7f6e
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-avr/relax-02.s
@@ -0,0 +1,65 @@
+ .section ".text", "ax",@progbits
+ .global _start, dest, end_label
+ .global func_1, func_2, func_3
+
+_start:
+local_start:
+ nop
+ nop
+ nop
+ nop
+ nop
+ .type _start, @function
+ .size _start, .-_start
+
+ .type local_start, @function
+ .size local_start, .-local_start
+
+func_1:
+local_func_1:
+ nop
+ nop
+ nop
+ nop
+ nop
+ .type func_1, @function
+ .size func_1, .-func_1
+
+ .type local_func_1, @function
+ .size local_func_1, .-local_func_1
+
+func_2:
+local_func_2:
+ nop
+ jmp dest
+ jmp dest
+ jmp dest
+ nop
+ .type func_2, @function
+ .size func_2, .-func_2
+
+ .type local_func_2, @function
+ .size local_func_2, .-local_func_2
+
+func_3:
+local_func_3:
+ nop
+ nop
+ nop
+ nop
+ nop
+ .type func_3, @function
+ .size func_3, .-func_3
+
+ .type local_func_3, @function
+ .size local_func_3, .-local_func_3
+
+dest:
+ nop
+ nop
+ nop
+ nop
+ nop
+
+end_label:
+local_end_label:
diff --git a/binutils-2.25/ld/testsuite/ld-avr/relax-03.d b/binutils-2.25/ld/testsuite/ld-avr/relax-03.d
new file mode 100644
index 00000000..3adc2793
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-avr/relax-03.d
@@ -0,0 +1,26 @@
+#name: AVR relaxation, single function in section.
+#as: -mmcu=avrxmega2 -mlink-relax
+#ld: -mavrxmega2 --relax
+#source: relax-03.s
+#objdump: -tzd
+#target: avr-*-*
+
+.*: file format elf32-avr
+
+SYMBOL TABLE:
+#...
+00000000 l F .text 0000000a local_start
+0000000a l .text 00000000 local_end_label
+#...
+00000000 g F \.text 0000000a _start
+0000000a g \.text 00000000 end_label
+#...
+
+Disassembly of section \.text:
+
+00000000 <_start>:
+ 0: 00 00 nop
+ 2: 03 c0 rjmp \.\+6 ; 0xa <.*>
+ 4: 02 c0 rjmp \.\+4 ; 0xa <.*>
+ 6: 01 c0 rjmp \.\+2 ; 0xa <.*>
+ 8: 00 00 nop
diff --git a/binutils-2.25/ld/testsuite/ld-avr/relax-03.s b/binutils-2.25/ld/testsuite/ld-avr/relax-03.s
new file mode 100644
index 00000000..09935025
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-avr/relax-03.s
@@ -0,0 +1,18 @@
+ .section ".text", "ax",@progbits
+ .global _start, end_label
+
+_start:
+local_start:
+ nop
+ jmp end_label
+ jmp end_label
+ jmp end_label
+ nop
+ .type _start, @function
+ .size _start, .-_start
+
+ .type local_start, @function
+ .size local_start, .-local_start
+
+end_label:
+local_end_label:
diff --git a/binutils-2.25/ld/testsuite/ld-pe/longsecn-1.d b/binutils-2.25/ld/testsuite/ld-pe/longsecn-1.d
index 81a44a7f..81a44a7f 100644..100755
--- a/binutils-2.25/ld/testsuite/ld-pe/longsecn-1.d
+++ b/binutils-2.25/ld/testsuite/ld-pe/longsecn-1.d
diff --git a/binutils-2.25/ld/testsuite/ld-pe/longsecn-2.d b/binutils-2.25/ld/testsuite/ld-pe/longsecn-2.d
index 64d16277..64d16277 100644..100755
--- a/binutils-2.25/ld/testsuite/ld-pe/longsecn-2.d
+++ b/binutils-2.25/ld/testsuite/ld-pe/longsecn-2.d
diff --git a/binutils-2.25/ld/testsuite/ld-pe/longsecn-3.d b/binutils-2.25/ld/testsuite/ld-pe/longsecn-3.d
index c86a828d..c86a828d 100644..100755
--- a/binutils-2.25/ld/testsuite/ld-pe/longsecn-3.d
+++ b/binutils-2.25/ld/testsuite/ld-pe/longsecn-3.d
diff --git a/binutils-2.25/ld/testsuite/ld-pe/longsecn-4.d b/binutils-2.25/ld/testsuite/ld-pe/longsecn-4.d
index e326d98e..e326d98e 100644..100755
--- a/binutils-2.25/ld/testsuite/ld-pe/longsecn-4.d
+++ b/binutils-2.25/ld/testsuite/ld-pe/longsecn-4.d
diff --git a/binutils-2.25/ld/testsuite/ld-pe/longsecn-5.d b/binutils-2.25/ld/testsuite/ld-pe/longsecn-5.d
index f3ef22bd..f3ef22bd 100644..100755
--- a/binutils-2.25/ld/testsuite/ld-pe/longsecn-5.d
+++ b/binutils-2.25/ld/testsuite/ld-pe/longsecn-5.d
diff --git a/binutils-2.25/ld/testsuite/ld-pe/longsecn.d b/binutils-2.25/ld/testsuite/ld-pe/longsecn.d
index e77f6eea..e77f6eea 100644..100755
--- a/binutils-2.25/ld/testsuite/ld-pe/longsecn.d
+++ b/binutils-2.25/ld/testsuite/ld-pe/longsecn.d
diff --git a/binutils-2.25/ld/testsuite/ld-pe/non-c-lang-syms.s b/binutils-2.25/ld/testsuite/ld-pe/non-c-lang-syms.s
index 28006a1b..28006a1b 100644..100755
--- a/binutils-2.25/ld/testsuite/ld-pe/non-c-lang-syms.s
+++ b/binutils-2.25/ld/testsuite/ld-pe/non-c-lang-syms.s
diff --git a/binutils-2.25/ld/testsuite/ld-pe/pe-compile.exp b/binutils-2.25/ld/testsuite/ld-pe/pe-compile.exp
index ccc8516f..ccc8516f 100644..100755
--- a/binutils-2.25/ld/testsuite/ld-pe/pe-compile.exp
+++ b/binutils-2.25/ld/testsuite/ld-pe/pe-compile.exp
diff --git a/binutils-2.25/ld/testsuite/ld-pe/pe-run.exp b/binutils-2.25/ld/testsuite/ld-pe/pe-run.exp
index fb823402..fb823402 100644..100755
--- a/binutils-2.25/ld/testsuite/ld-pe/pe-run.exp
+++ b/binutils-2.25/ld/testsuite/ld-pe/pe-run.exp
diff --git a/binutils-2.25/ld/testsuite/ld-unique/unique.exp b/binutils-2.25/ld/testsuite/ld-unique/unique.exp
index a93f9b2e..994ed87c 100644
--- a/binutils-2.25/ld/testsuite/ld-unique/unique.exp
+++ b/binutils-2.25/ld/testsuite/ld-unique/unique.exp
@@ -28,7 +28,7 @@
# arm, powerpc, and sparc so far.
if {!(([istarget "i?86-*-*"]
|| [istarget "x86_64-*-*"]
- || [istarget "arm-*-*"]
+ || [istarget "arm*-*-*"]
|| [istarget "powerpc*-*-*"]
|| [istarget "sparc*-*-*"])
&& ([istarget "*-*-elf*"]
diff --git a/binutils-2.25/ld/testsuite/ld-unique/unique.s b/binutils-2.25/ld/testsuite/ld-unique/unique.s
index 9b0593c2..7477a694 100644
--- a/binutils-2.25/ld/testsuite/ld-unique/unique.s
+++ b/binutils-2.25/ld/testsuite/ld-unique/unique.s
@@ -1,4 +1,4 @@
- .type a, @gnu_unique_object
+ .type a, %gnu_unique_object
a: .long 0
.size a, .-a
diff --git a/binutils-2.25/ld/testsuite/ld-unique/unique_shared.s b/binutils-2.25/ld/testsuite/ld-unique/unique_shared.s
index b18a5b1b..80222915 100644
--- a/binutils-2.25/ld/testsuite/ld-unique/unique_shared.s
+++ b/binutils-2.25/ld/testsuite/ld-unique/unique_shared.s
@@ -1,3 +1,3 @@
- .type b, @gnu_unique_object
+ .type b, %gnu_unique_object
b: .long 0
.size b, .-b
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-1.d b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-1.d
index 11313ab1..cdcb4f69 100644
--- a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-1.d
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-1.d
@@ -1,5 +1,5 @@
#as: --64 -madd-bnd-prefix
-#ld: -shared -melf_x86_64 -z bndplt
+#ld: -shared -melf_x86_64
#objdump: -dw
#...
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-2.d b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-2.d
index 6be82902..43e33565 100644
--- a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-2.d
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-ifunc-2.d
@@ -1,5 +1,5 @@
#as: --64 -madd-bnd-prefix
-#ld: -shared -melf_x86_64 -z bndplt
+#ld: -shared -melf_x86_64
#objdump: -dw
#...
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-plt-1.d b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-plt-1.d
index d76a7a7d..3cfe9e6b 100644
--- a/binutils-2.25/ld/testsuite/ld-x86-64/bnd-plt-1.d
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/bnd-plt-1.d
@@ -1,6 +1,6 @@
#source: bnd-branch-1.s
#as: --64
-#ld: -shared -melf_x86_64 -z bndplt
+#ld: -shared -melf_x86_64
#objdump: -dw
.*: +file format .*
@@ -13,8 +13,8 @@ Disassembly of section .plt:
[ ]*[a-f0-9]+: f2 ff 25 83 01 20 00 bnd jmpq \*0x200183\(%rip\) # 200440 <_GLOBAL_OFFSET_TABLE_\+0x10>
[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
-[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
+[ ]*[a-f0-9]+: e9 e6 ff ff ff jmpq 2b0 <foo2@plt-0x50>
+[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\)
[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50>
[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
@@ -22,14 +22,14 @@ Disassembly of section .plt:
[ ]*[a-f0-9]+: f2 e9 c5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50>
[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
[ ]*[a-f0-9]+: 68 03 00 00 00 pushq \$0x3
-[ ]*[a-f0-9]+: f2 e9 b5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
+[ ]*[a-f0-9]+: e9 b6 ff ff ff jmpq 2b0 <foo2@plt-0x50>
+[ ]*[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\)
Disassembly of section .plt.bnd:
0+300 <foo2@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmpq \*0x200141\(%rip\) # 200448 <_GLOBAL_OFFSET_TABLE_\+0x18>
-[ ]*[a-f0-9]+: 90 nop
+[ ]*[a-f0-9]+: ff 25 42 01 20 00 jmpq \*0x200142\(%rip\) # 200448 <_GLOBAL_OFFSET_TABLE_\+0x18>
+[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax
0+308 <foo3@plt>:
[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmpq \*0x200141\(%rip\) # 200450 <_GLOBAL_OFFSET_TABLE_\+0x20>
@@ -40,8 +40,8 @@ Disassembly of section .plt.bnd:
[ ]*[a-f0-9]+: 90 nop
0+318 <foo4@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmpq \*0x200141\(%rip\) # 200460 <_GLOBAL_OFFSET_TABLE_\+0x30>
-[ ]*[a-f0-9]+: 90 nop
+[ ]*[a-f0-9]+: ff 25 42 01 20 00 jmpq \*0x200142\(%rip\) # 200460 <_GLOBAL_OFFSET_TABLE_\+0x30>
+[ ]*[a-f0-9]+: 66 90 xchg %ax,%ax
Disassembly of section .text:
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.d b/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.d
new file mode 100644
index 00000000..f2ee2457
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.d
@@ -0,0 +1,6 @@
+#as: --64
+#ld: -shared -melf_x86_64
+#readelf: -r --wide
+
+#...
+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_GLOB_DAT +[0-9a-f]+ +foo \+ 0
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.s b/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.s
new file mode 100644
index 00000000..06758434
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/gotplt1.s
@@ -0,0 +1,5 @@
+ .globl _start
+ .type _start, @function
+_start:
+ movabsq $foo@GOTPLT, %rax
+ .size _start, .-_start
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx.exp b/binutils-2.25/ld/testsuite/ld-x86-64/mpx.exp
index bdf95935..f2a50d46 100644
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx.exp
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/mpx.exp
@@ -74,21 +74,6 @@ set run_tests {
{dummy.s} "mpx2static" "mpx2.out"}
}
-run_ld_link_tests {
- {"Build libcall.so"
- "-m elf_x86_64 -shared -z bndplt" "" "--64"
- {mpx3b.s} {} "libcall.so"}
- {"Build mpx3"
- "-m elf_x86_64 -z bndplt tmpdir/libcall.so" "" "--64"
- {mpx3a.s} {{objdump -dw mpx3.dd}} "mpx3"}
- {"Build libcall1.so"
- "-m elf_x86_64 -shared -z bndplt" "" "--64"
- {mpx4b.s} {} "libcall1.so"}
- {"Build mpx4"
- "-m elf_x86_64 -z bndplt tmpdir/libcall1.so" "" "--64"
- {mpx4a.s} {{objdump -dw mpx4.dd}} "mpx4"}
-}
-
run_ld_link_exec_tests [] $run_tests
run_dump_test "bnd-branch-1"
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx1a.rd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx1a.rd
index d66524c8..9bebc829 100644
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx1a.rd
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/mpx1a.rd
@@ -1,3 +1,3 @@
#...
-[0-9a-f ]+R_X86_64_PLT32 +0+ +.*
+[0-9a-f ]+R_X86_64_PLT32_BND +0+ +.*
#...
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx1c.rd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx1c.rd
index d3b292cb..2b050bd8 100644
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx1c.rd
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/mpx1c.rd
@@ -1,3 +1,3 @@
#...
-[0-9a-f ]+R_X86_64_PC32 +0+ +.*
+[0-9a-f ]+R_X86_64_PC32_BND +0+ +.*
#...
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx2a.rd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx2a.rd
index d66524c8..9bebc829 100644
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx2a.rd
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/mpx2a.rd
@@ -1,3 +1,3 @@
#...
-[0-9a-f ]+R_X86_64_PLT32 +0+ +.*
+[0-9a-f ]+R_X86_64_PLT32_BND +0+ +.*
#...
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx2c.rd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx2c.rd
index d66524c8..9bebc829 100644
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx2c.rd
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/mpx2c.rd
@@ -1,3 +1,3 @@
#...
-[0-9a-f ]+R_X86_64_PLT32 +0+ +.*
+[0-9a-f ]+R_X86_64_PLT32_BND +0+ +.*
#...
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3.dd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx3.dd
deleted file mode 100644
index 2a8356d9..00000000
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3.dd
+++ /dev/null
@@ -1,35 +0,0 @@
-.*: +file format .*
-
-
-Disassembly of section .plt:
-
-0+400290 <.plt>:
-[ ]*[a-f0-9]+: ff 35 6a 01 20 00 pushq 0x20016a\(%rip\) # 600400 <_GLOBAL_OFFSET_TABLE_\+0x8>
-[ ]*[a-f0-9]+: f2 ff 25 6b 01 20 00 bnd jmpq \*0x20016b\(%rip\) # 600408 <_GLOBAL_OFFSET_TABLE_\+0x10>
-[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
-[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
-[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 400290 <call1@plt-0x30>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
-[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
-[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmpq 400290 <call1@plt-0x30>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
-
-Disassembly of section .plt.bnd:
-
-0+4002c0 <call1@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 49 01 20 00 bnd jmpq \*0x200149\(%rip\) # 600410 <_GLOBAL_OFFSET_TABLE_\+0x18>
-[ ]*[a-f0-9]+: 90 nop
-
-0+4002c8 <call2@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 49 01 20 00 bnd jmpq \*0x200149\(%rip\) # 600418 <_GLOBAL_OFFSET_TABLE_\+0x20>
-[ ]*[a-f0-9]+: 90 nop
-
-Disassembly of section .text:
-
-0+4002d0 <_start>:
-[ ]*[a-f0-9]+: bf c0 02 40 00 mov \$0x4002c0,%edi
-[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
-[ ]*[a-f0-9]+: 48 8b 3d 41 01 20 00 mov 0x200141\(%rip\),%rdi # 600420 <func>
-[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
-[ ]*[a-f0-9]+: c3 retq
-#pass
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3a.s b/binutils-2.25/ld/testsuite/ld-x86-64/mpx3a.s
deleted file mode 100644
index 28cb580b..00000000
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3a.s
+++ /dev/null
@@ -1,16 +0,0 @@
- .text
- .globl _start
- .type _start, @function
-_start:
- movl $call1, %edi
- bnd call *%rdi
- movq func(%rip), %rdi
- bnd call *%rdi
- ret
- .size _start, .-_start
- .globl func
- .data
- .type func, @object
- .size func, 8
-func:
- .quad call2
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3b.s b/binutils-2.25/ld/testsuite/ld-x86-64/mpx3b.s
deleted file mode 100644
index 1ee2557a..00000000
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx3b.s
+++ /dev/null
@@ -1,11 +0,0 @@
- .text
- .globl call1
- .type call1, @function
-call1:
- ret
- .size call1, .-call1
- .globl call2
- .type call2, @function
-call2:
- ret
- .size call2, .-call2
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4.dd b/binutils-2.25/ld/testsuite/ld-x86-64/mpx4.dd
deleted file mode 100644
index 0cf0f758..00000000
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4.dd
+++ /dev/null
@@ -1,24 +0,0 @@
-.*: +file format .*
-
-
-Disassembly of section .plt:
-
-0+400260 <.plt>:
-[ ]*[a-f0-9]+: ff 35 42 01 20 00 pushq 0x200142\(%rip\) # 6003a8 <_GLOBAL_OFFSET_TABLE_\+0x8>
-[ ]*[a-f0-9]+: f2 ff 25 43 01 20 00 bnd jmpq \*0x200143\(%rip\) # 6003b0 <_GLOBAL_OFFSET_TABLE_\+0x10>
-[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
-[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
-[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 400260 <call1@plt-0x20>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
-
-Disassembly of section .plt.bnd:
-
-0+400280 <call1@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 31 01 20 00 bnd jmpq \*0x200131\(%rip\) # 6003b8 <_GLOBAL_OFFSET_TABLE_\+0x18>
-[ ]*[a-f0-9]+: 90 nop
-
-Disassembly of section .text:
-
-0+400288 <_start>:
-[ ]*[a-f0-9]+: bf 80 02 40 00 mov \$0x400280,%edi
-[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4a.s b/binutils-2.25/ld/testsuite/ld-x86-64/mpx4a.s
deleted file mode 100644
index 0ee2723b..00000000
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4a.s
+++ /dev/null
@@ -1,6 +0,0 @@
-.text
- .globl _start
- .type _start, @function
-_start:
- movl $call1, %edi
- bnd call *%rdi
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4b.s b/binutils-2.25/ld/testsuite/ld-x86-64/mpx4b.s
deleted file mode 100644
index 0e9ac14e..00000000
--- a/binutils-2.25/ld/testsuite/ld-x86-64/mpx4b.s
+++ /dev/null
@@ -1,5 +0,0 @@
-.text
- .globl call1
- .type call1, @function
-call1:
- ret
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/start.o b/binutils-2.25/ld/testsuite/ld-x86-64/start.o
new file mode 100644
index 00000000..e015e739
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/start.o
Binary files differ
diff --git a/binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp b/binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp
index 54786a78..a9b68ff2 100644
--- a/binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/binutils-2.25/ld/testsuite/ld-x86-64/x86-64.exp
@@ -227,6 +227,7 @@ run_dump_test "pr12570a"
run_dump_test "pr12570b"
run_dump_test "pr14215"
run_dump_test "pr14207"
+run_dump_test "gotplt1"
if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
return
diff --git a/binutils-2.25/ld/testsuite/lib/ld-lib.exp b/binutils-2.25/ld/testsuite/lib/ld-lib.exp
index 7d2df221..09213bcf 100644
--- a/binutils-2.25/ld/testsuite/lib/ld-lib.exp
+++ b/binutils-2.25/ld/testsuite/lib/ld-lib.exp
@@ -1410,6 +1410,13 @@ proc run_cc_link_tests { ldtests } {
global CXXFLAGS
global ar
global exec_output
+ global board_cflags
+
+ if [board_info [target_info name] exists cflags] {
+ set board_cflags " [board_info [target_info name] cflags]"
+ } else {
+ set board_cflags ""
+ }
foreach testitem $ldtests {
set testname [lindex $testitem 0]
@@ -1466,7 +1473,7 @@ proc run_cc_link_tests { ldtests } {
set failed 1
}
} else {
- if { ![ld_simple_link $cc_cmd $binfile "-L$srcdir/$subdir $ldflags $objfiles"] } {
+ if { ![ld_simple_link $cc_cmd $binfile "$board_cflags -L$srcdir/$subdir $ldflags $objfiles"] } {
set failed 1
}