mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
066f4018ae
This implements an optimisation that converts sequences like addis r9,r2,sym@got@ha ld r3,sym@got@l(r9) to addis r9,r2,sym@toc@ha addi r3,r9,sym@toc@l when "sym" is locally defined and can't be overridden. bfd/ * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel. (struct _ppc64_elf_section_data): Likewise. (ppc64_elf_check_relocs): Set above fields. (ppc64_elf_edit_toc): Add a pass over GOT relocs. (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative when possible. ld/ * testsuite/ld-powerpc/elfv2exe.d: Update. * testsuite/ld-powerpc/elfv2so.d: Update. * testsuite/ld-powerpc/tocopt.d: Update. * testsuite/ld-powerpc/tocopt.s: Update. * testsuite/ld-powerpc/tocopt5.d: Update. * testsuite/ld-powerpc/tocopt5.s: Update. * testsuite/ld-powerpc/tocopt7.d: Update. * testsuite/ld-powerpc/tocopt7.s: Update. * testsuite/ld-powerpc/tocopt8.d: Update. * testsuite/ld-powerpc/tocopt8.s: Update.
15 lines
776 B
Makefile
15 lines
776 B
Makefile
|
|
.*: file format .*
|
|
|
|
Contents of section \.text:
|
|
100000b0 (3d220000|0000223d) (39298028|28802939) (3c820000|0000823c) (38a48018|1880a438) .*
|
|
100000c0 (e8c50000|0000c5e8) (3fa00000|0000a03f) (3bbd8020|2080bd3b) (7c62e82a|2ae8627c) .*
|
|
100000d0 (3d220000|0000223d) (3929802b|2b802939) (3c820000|0000823c) (38a48008|0880a438) .*
|
|
100000e0 (e8c50000|0000c5e8) (3fa00000|0000a03f) (3bbd8010|1080bd3b) (7c62e82a|2ae8627c) .*
|
|
Contents of section \.got:
|
|
10010100 (00000000|00810110) (10018100|00000000) (00000000|2c010110) (1001012c|00000000) .*
|
|
10010110 (00000000|2d010110) (1001012d|00000000) (00000000|29010110) (10010129|00000000) .*
|
|
10010120 (00000000|2a010110) (1001012a|00000000) .*
|
|
Contents of section \.sdata:
|
|
10010128 01020304 0506 .*
|