]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix the generation of GOT table entries for the SH in the presence of linker garbage...
authorNick Clifton <nickc@redhat.com>
Thu, 4 Aug 2016 15:00:27 +0000 (16:00 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 4 Aug 2016 15:00:27 +0000 (16:00 +0100)
PR ld/17739
* emulparams/shelf.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Define with
ld valye 'yes'.
* emulparams/shelf32.sh: Likewise.
* emulparams/shelf32.sh: Likewise.
* emulparams/shelf_nto.sh: Likewise.
* emulparams/shelf_nto.sh: Likewise.
* emulparams/shelf_vxworks.sh: Likewise.
* emulparams/shelf_vxworks.sh: Likewise.
* emulparams/shlelf32_linux.sh: Likewise.
* emulparams/shlelf32_linux.sh: Likewise.
* emulparams/shlelf_linux.sh: Likewise.
* emulparams/shlelf_linux.sh: Likewise.
* emulparams/shlelf_nto.sh: Likewise.
* emulparams/shlelf_nto.sh: Likewise.

bfd * elf32-sh.c (sh_elf_gc_sweep_hook): Delete.
(elf_backend_sweep_hook): Delete.

bfd/ChangeLog
bfd/elf32-sh.c
ld/ChangeLog
ld/emulparams/shelf.sh
ld/emulparams/shelf32.sh
ld/emulparams/shelf_nto.sh
ld/emulparams/shelf_vxworks.sh
ld/emulparams/shlelf32_linux.sh
ld/emulparams/shlelf_linux.sh
ld/emulparams/shlelf_nto.sh

index 2affa223fa9188606d8e3e027c65a8206f47740e..48d41e57ef08f8a254b9bb61a2a5cbde23ee4c7b 100644 (file)
@@ -1,3 +1,9 @@
+2016-08-02  Nick Clifton  <nickc@redhat.com>
+
+       PR ld/17739
+       * elf32-sh.c (sh_elf_gc_sweep_hook): Delete.
+       (elf_backend_sweep_hook): Delete.
+
 2016-08-03  Tristan Gingold  <gingold@adacore.com>
 
        * version.m4: Bump version to 2.27.0
index 52a5fd1bd3156587d2009eca0c7d18316a6f5871..5609b55da61b66b80acfdf9591131e237d92e53e 100644 (file)
@@ -5682,6 +5682,7 @@ sh_elf_gc_mark_hook (asection *sec,
   return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
 }
 
+#if 0
 /* Update the got entry reference counts for the section being removed.  */
 
 static bfd_boolean
@@ -5895,6 +5896,7 @@ sh_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
 
   return TRUE;
 }
+#endif
 
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
@@ -7455,7 +7457,7 @@ sh_elf_encode_eh_address (bfd *abfd,
                                        sh_elf_merge_private_data
 
 #define elf_backend_gc_mark_hook       sh_elf_gc_mark_hook
-#define elf_backend_gc_sweep_hook      sh_elf_gc_sweep_hook
+//#define elf_backend_gc_sweep_hook    sh_elf_gc_sweep_hook
 #define elf_backend_check_relocs       sh_elf_check_relocs
 #define elf_backend_copy_indirect_symbol \
                                        sh_elf_copy_indirect_symbol
index 062e134145cd7074a888e00dbfe0fa4abd814403..d95592a5256aa8fa7eb11e3e5b29e1c9f027915e 100644 (file)
@@ -1,3 +1,21 @@
+2016-08-02  Nick Clifton  <nickc@redhat.com>
+
+       PR ld/17739
+       * emulparams/shelf.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Define with
+       valye 'yes'.
+       * emulparams/shelf32.sh: Likewise.
+       * emulparams/shelf32.sh: Likewise.
+       * emulparams/shelf_nto.sh: Likewise.
+       * emulparams/shelf_nto.sh: Likewise.
+       * emulparams/shelf_vxworks.sh: Likewise.
+       * emulparams/shelf_vxworks.sh: Likewise.
+       * emulparams/shlelf32_linux.sh: Likewise.
+       * emulparams/shlelf32_linux.sh: Likewise.
+       * emulparams/shlelf_linux.sh: Likewise.
+       * emulparams/shlelf_linux.sh: Likewise.
+       * emulparams/shlelf_nto.sh: Likewise.
+       * emulparams/shlelf_nto.sh: Likewise.
+
 2016-08-03  Tristan Gingold  <gingold@adacore.com>
 
        * configure: Regenerate.
index 83680a667fb691e0ae6fdd1b2bf7aee11790268d..d3f4752e883a17de27e589fab052ba79646e1ee2 100644 (file)
@@ -11,6 +11,9 @@ MACHINE=
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 EMBEDDED=yes
+# PR 17739.  Delay checking relocs until after all files have
+# been opened and linker garbage collection has taken place.
+CHECK_RELOCS_AFTER_OPEN_INPUT=yes
 
 # These are for compatibility with the COFF toolchain.
 ENTRY=start
index 966bd3093cd732fada7a8722a637a76feaf0fd84..bf362c5a2ebdd8be39028b5b98e8689bc71642ac 100644 (file)
@@ -11,6 +11,9 @@ ALIGNMENT=8
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 EMBEDDED=yes
+# PR 17739.  Delay checking relocs until after all files have
+# been opened and linker garbage collection has taken place.
+CHECK_RELOCS_AFTER_OPEN_INPUT=yes
 
 DATA_START_SYMBOLS='PROVIDE (___data = .);'
 
index c4d71aa99932fd85201768c6e701955a23aebb51..46efd8789609813be6f706fc099f99318f476b80 100644 (file)
@@ -9,3 +9,6 @@ TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 TEXT_START_SYMBOLS='_btext = .;'
 ENTRY=_start
+# PR 17739.  Delay checking relocs until after all files have
+# been opened and linker garbage collection has taken place.
+CHECK_RELOCS_AFTER_OPEN_INPUT=yes
index 77619cb2ac6ac960505e744b9c98c70b387e7231..759ffac2886ce3c8da872eef7f64c7f8b78a8124 100644 (file)
@@ -14,6 +14,10 @@ TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 ENTRY=__start
 SYMPREFIX=_
+# PR 17739.  Delay checking relocs until after all files have
+# been opened and linker garbage collection has taken place.
+CHECK_RELOCS_AFTER_OPEN_INPUT=yes
+
 GOT=".got          ${RELOCATING-0} : {
   PROVIDE(__GLOBAL_OFFSET_TABLE_ = .);
   *(.got.plt) *(.got) }"
index 81aea39c81f1f802cab2d143221329ba5d2a1e17..0327e57ad64a9254a9aa6e64e119299c7f632e7c 100644 (file)
@@ -13,7 +13,9 @@ ALIGNMENT=8
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
-
+# PR 17739.  Delay checking relocs until after all files have
+# been opened and linker garbage collection has taken place.
+CHECK_RELOCS_AFTER_OPEN_INPUT=yes
 
 DATA_START_SYMBOLS='PROVIDE (___data = .);'
 
index c14aae228d173337e120c37b7946978e449c6f67..4e2a5813f20ca8f0d10b79eb708112d8f6117649 100644 (file)
@@ -12,6 +12,9 @@ MACHINE=
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
+# PR 17739.  Delay checking relocs until after all files have
+# been opened and linker garbage collection has taken place.
+CHECK_RELOCS_AFTER_OPEN_INPUT=yes
 
 DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
 
index 16f65087eb08612d803ddcc4810a8db01252ebd1..f8ffc13b36bed3c4e13a0fcc2a2616bf26fce812 100644 (file)
@@ -9,3 +9,6 @@ TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 TEXT_START_SYMBOLS='_btext = .;'
 ENTRY=_start
+# PR 17739.  Delay checking relocs until after all files have
+# been opened and linker garbage collection has taken place.
+CHECK_RELOCS_AFTER_OPEN_INPUT=yes