From 5d58c7337972bb24caea7598d0ae4d461b0fc22b Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Thu, 23 Feb 2017 22:27:50 +0000 Subject: MIPS/BFD: Remove duplicate NewABI JALR relocation handling Remove separate original NewABI JALR relocation handling, introduced with commit d06471104a83 ("relax jalr $t9 [R_MIPS_JALR symbol] to bal symbol"), , and only used by LD with the `--relax' option specified, and rely solely on `mips_elf_perform_relocation' code, which has been introduced with commit 1367d393bb74 ("On the RM9000 convert jal to bal if in range"), and since made more complete, across all the three ABIs. Also remove the `--relax' option, now irrelevant, from the tests added with the former commit. bfd/ * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype. * elfxx-mips.c (_bfd_mips_relax_section): Remove function. * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro. * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise. ld/ * testsuite/ld-mips-elf/relax-jalr-n32.d: Remove `--relax' option. * testsuite/ld-mips-elf/relax-jalr-n32-shared.d: Likewise. * testsuite/ld-mips-elf/relax-jalr-n64.d: Likewise. * testsuite/ld-mips-elf/relax-jalr-n64-shared.d: Likewise. --- ld/ChangeLog | 8 ++++++++ ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d | 2 +- ld/testsuite/ld-mips-elf/relax-jalr-n32.d | 2 +- ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d | 2 +- ld/testsuite/ld-mips-elf/relax-jalr-n64.d | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) (limited to 'ld') diff --git a/ld/ChangeLog b/ld/ChangeLog index 3e88456..420a9ab 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,13 @@ 2017-02-23 Maciej W. Rozycki + * testsuite/ld-mips-elf/relax-jalr-n32.d: Remove `--relax' + option. + * testsuite/ld-mips-elf/relax-jalr-n32-shared.d: Likewise. + * testsuite/ld-mips-elf/relax-jalr-n64.d: Likewise. + * testsuite/ld-mips-elf/relax-jalr-n64-shared.d: Likewise. + +2017-02-23 Maciej W. Rozycki + * testsuite/ld-mips-elf/jalr4.dd: New test. * testsuite/ld-mips-elf/mips-elf.exp: Run the new test. diff --git a/ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d b/ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d index 3b56441..2eb8152 100644 --- a/ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d +++ b/ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d @@ -2,7 +2,7 @@ #source: relax-jalr.s #as: -march=from-abi -KPIC -n32 -EB #objdump: --prefix-addresses -d --show-raw-insn -#ld: --relax -shared -melf32btsmipn32 +#ld: -shared -melf32btsmipn32 .*: file format elf.*mips.* diff --git a/ld/testsuite/ld-mips-elf/relax-jalr-n32.d b/ld/testsuite/ld-mips-elf/relax-jalr-n32.d index 3a4b0b6..b0ea9c0 100644 --- a/ld/testsuite/ld-mips-elf/relax-jalr-n32.d +++ b/ld/testsuite/ld-mips-elf/relax-jalr-n32.d @@ -2,7 +2,7 @@ #source: relax-jalr.s #as: -march=from-abi -KPIC -n32 -EB #objdump: --prefix-addresses -d --show-raw-insn -#ld: --relax -melf32btsmipn32 +#ld: -melf32btsmipn32 .*: file format elf.*mips.* diff --git a/ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d b/ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d index c0138ea..fcb0b12 100644 --- a/ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d +++ b/ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d @@ -2,7 +2,7 @@ #source: relax-jalr.s #as: -march=from-abi -KPIC -64 -EB #objdump: --prefix-addresses -d --show-raw-insn -#ld: --relax -shared -melf64btsmip +#ld: -shared -melf64btsmip .*: file format elf.*mips.* diff --git a/ld/testsuite/ld-mips-elf/relax-jalr-n64.d b/ld/testsuite/ld-mips-elf/relax-jalr-n64.d index 6b4f3f5..e3518ba 100644 --- a/ld/testsuite/ld-mips-elf/relax-jalr-n64.d +++ b/ld/testsuite/ld-mips-elf/relax-jalr-n64.d @@ -2,7 +2,7 @@ #source: relax-jalr.s #as: -march=from-abi -KPIC -64 -EB #objdump: --prefix-addresses -d --show-raw-insn -#ld: --relax -melf64btsmip +#ld: -melf64btsmip .*: file format elf.*mips.* -- cgit v1.1