diff options
author | Alan Modra <amodra@gmail.com> | 2019-04-30 16:33:25 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-05-24 10:27:53 +0930 |
commit | 4a421c53cf609d68fe956c2e7270d34c0ab8500f (patch) | |
tree | 8a241a9458a01b131577c6eaf6b5ca98d91d4421 /ld/testsuite/ld-powerpc/pcrelopt.sec | |
parent | 5663e321848545857a690f30a780187e3366bd2d (diff) | |
download | gdb-4a421c53cf609d68fe956c2e7270d34c0ab8500f.zip gdb-4a421c53cf609d68fe956c2e7270d34c0ab8500f.tar.gz gdb-4a421c53cf609d68fe956c2e7270d34c0ab8500f.tar.bz2 |
PowerPC GOT_PCREL34 optimisation
bfd/
* elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
R_PPC64_GOT_PCREL34.
(xlate_pcrel_opt): New function.
(ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
(ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
ld/
* testsuite/ld-powerpc/pcrelopt.s,
* testsuite/ld-powerpc/pcrelopt.d,
* testsuite/ld-powerpc/pcrelopt.sec: New test.
* testsuite/ld-powerpc/powerpc.exp: Run it.
Diffstat (limited to 'ld/testsuite/ld-powerpc/pcrelopt.sec')
-rw-r--r-- | ld/testsuite/ld-powerpc/pcrelopt.sec | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/testsuite/ld-powerpc/pcrelopt.sec b/ld/testsuite/ld-powerpc/pcrelopt.sec new file mode 100644 index 0000000..1dcd3a7 --- /dev/null +++ b/ld/testsuite/ld-powerpc/pcrelopt.sec @@ -0,0 +1,6 @@ +# check for just one GOT entry +#... +.* \.rela\.dyn +RELA +[0-9a-f]+ [0-9a-f]+ 000018 .* +#... +.* \.got +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000010 .* +#pass |