diff options
author | Nick Clifton <nickc@redhat.com> | 2016-08-02 11:56:55 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-08-02 11:56:55 +0100 |
commit | a94d834c9d0108f0bb50ddc311554d1bed320f54 (patch) | |
tree | 38a2844c27456130d6b787866d05d7961c1cc27e /ld | |
parent | 2d5bddc1eb5d2c04ed142c7ba6fc13e2e3a28079 (diff) | |
download | gdb-a94d834c9d0108f0bb50ddc311554d1bed320f54.zip gdb-a94d834c9d0108f0bb50ddc311554d1bed320f54.tar.gz gdb-a94d834c9d0108f0bb50ddc311554d1bed320f54.tar.bz2 |
Fix SH GOT allocation in the presence of linker garbage collection.
PR ld/17739
ld * 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.
bfd * elf32-sh.c (sh_elf_gc_sweep_hook): Delete.
(elf_backend_sweep_hook): Delete.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 18 | ||||
-rw-r--r-- | ld/emulparams/shelf.sh | 3 | ||||
-rw-r--r-- | ld/emulparams/shelf32.sh | 3 | ||||
-rw-r--r-- | ld/emulparams/shelf_nto.sh | 3 | ||||
-rw-r--r-- | ld/emulparams/shelf_vxworks.sh | 4 | ||||
-rw-r--r-- | ld/emulparams/shlelf32_linux.sh | 4 | ||||
-rw-r--r-- | ld/emulparams/shlelf_linux.sh | 3 | ||||
-rw-r--r-- | ld/emulparams/shlelf_nto.sh | 3 |
8 files changed, 40 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 99bb6df..8dec408 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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-07-27 Maciej W. Rozycki <macro@imgtec.com> * testsuite/ld-mips-elf/micromips-branch-absolute.d: Update diff --git a/ld/emulparams/shelf.sh b/ld/emulparams/shelf.sh index 83680a6..d3f4752 100644 --- a/ld/emulparams/shelf.sh +++ b/ld/emulparams/shelf.sh @@ -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 diff --git a/ld/emulparams/shelf32.sh b/ld/emulparams/shelf32.sh index 966bd30..bf362c5 100644 --- a/ld/emulparams/shelf32.sh +++ b/ld/emulparams/shelf32.sh @@ -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 = .);' diff --git a/ld/emulparams/shelf_nto.sh b/ld/emulparams/shelf_nto.sh index c4d71aa..46efd87 100644 --- a/ld/emulparams/shelf_nto.sh +++ b/ld/emulparams/shelf_nto.sh @@ -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 diff --git a/ld/emulparams/shelf_vxworks.sh b/ld/emulparams/shelf_vxworks.sh index 77619cb..759ffac 100644 --- a/ld/emulparams/shelf_vxworks.sh +++ b/ld/emulparams/shelf_vxworks.sh @@ -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) }" diff --git a/ld/emulparams/shlelf32_linux.sh b/ld/emulparams/shlelf32_linux.sh index 81aea39..0327e57 100644 --- a/ld/emulparams/shlelf32_linux.sh +++ b/ld/emulparams/shlelf32_linux.sh @@ -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 = .);' diff --git a/ld/emulparams/shlelf_linux.sh b/ld/emulparams/shlelf_linux.sh index c14aae2..4e2a581 100644 --- a/ld/emulparams/shlelf_linux.sh +++ b/ld/emulparams/shlelf_linux.sh @@ -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 = .);'; diff --git a/ld/emulparams/shlelf_nto.sh b/ld/emulparams/shlelf_nto.sh index 16f6508..f8ffc13 100644 --- a/ld/emulparams/shlelf_nto.sh +++ b/ld/emulparams/shlelf_nto.sh @@ -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 |