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.
13 lines
607 B
Makefile
13 lines
607 B
Makefile
|
|
.*: file format .*
|
|
|
|
Contents of section \.text:
|
|
100000b0 (60000000|00000060) (39228020|20802239) (60000000|00000060) (38a28018|1880a238) .*
|
|
100000c0 (e8c50000|0000c5e8) (60000000|00000060) (39228023|23802239) (60000000|00000060) .*
|
|
100000d0 (38a28008|0880a238) (e8c50000|0000c5e8) .*
|
|
Contents of section \.got:
|
|
10010100 (00000000|00810110) (10018100|00000000) (00000000|24010110) (10010124|00000000) .*
|
|
10010110 (00000000|25010110) (10010125|00000000) (00000000|21010110) (10010121|00000000) .*
|
|
Contents of section \.sdata:
|
|
10010120 01020304 0506 .*
|