diff options
author | Alan Modra <amodra@gmail.com> | 2011-11-08 13:06:03 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-11-08 13:06:03 +0000 |
commit | 560c8763d325c11cf9cd29c54c55a653f780845a (patch) | |
tree | bcba52293ffc230988ab616af13082dc564e8409 /ld/testsuite/ld-powerpc | |
parent | d3895d7d29f0063fdae6bc1a78a23fcfb2570fed (diff) | |
download | binutils-560c8763d325c11cf9cd29c54c55a653f780845a.zip binutils-560c8763d325c11cf9cd29c54c55a653f780845a.tar.gz binutils-560c8763d325c11cf9cd29c54c55a653f780845a.tar.bz2 |
bfd/
* elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename
ha_relocs_not_using_r2 to unexpected_toc_insn.
(ok_lo_toc_insn): New function.
(ppc64_elf_edit_toc): Check insn on lo toc reloc. Emit warning.
(ppc64_elf_relocate_section): Don't check insn on lo toc reloc here.
Handle addic on lo toc reloc.
ld/testsuite/
* ld-powerpc/powerpc.exp: Expect ld warnings for tocopt test.
* ld-powerpc/tocopt.out: New file.
Diffstat (limited to 'ld/testsuite/ld-powerpc')
-rw-r--r-- | ld/testsuite/ld-powerpc/powerpc.exp | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/tocopt.out | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp index 7f9e7fa..566272d 100644 --- a/ld/testsuite/ld-powerpc/powerpc.exp +++ b/ld/testsuite/ld-powerpc/powerpc.exp @@ -204,7 +204,7 @@ set ppc64elftests { {"sym@tocbase" "-shared -melf64ppc" "-a64" {symtocbase-1.s symtocbase-2.s} {{objdump -dj.data symtocbase.d}} "symtocbase.so"} {"TOC opt" "-melf64ppc" "-a64" {tocopt.s} - {{objdump -s tocopt.d}} "tocopt"} + {{ld tocopt.out} {objdump -s tocopt.d}} "tocopt"} {"TOC opt2" "-melf64ppc --defsym x=2" "-a64" {tocopt2.s} {{ld tocopt2.out} {objdump -s tocopt2.d}} "tocopt2"} {"TOC opt3" "-melf64ppc -no-keep-memory --defsym x=2" "-a64" {tocopt3.s} diff --git a/ld/testsuite/ld-powerpc/tocopt.out b/ld/testsuite/ld-powerpc/tocopt.out new file mode 100644 index 0000000..6df909f --- /dev/null +++ b/ld/testsuite/ld-powerpc/tocopt.out @@ -0,0 +1,4 @@ +.* +\(\.text\+0x14\): .* 0x3fa00000 .* +.* +\(\.text\+0x34\): .* 0x3fa00010 .* |