mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
a27e685fa0
This change, with prerequisite 0e5fabeb
, provides a toc base aligned
to 256 bytes rather than 8 bytes. This is necessary for a minor gcc
optimisation, allowing use of d-form instructions to correctly access
toc-relative items larger than 8 bytes.
bfd/
* elf64-ppc.c (TOC_BASE_ALIGN): Define.
(ppc64_elf_next_toc_section): Align multi-got toc base.
(ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
ld/
* emulparams/elf64ppc.sh (GOT): Align.
ld/testsuite/
* ld-powerpc/ambiguousv1b.d: Update for aligned .got.
* ld-powerpc/defsym.d: Likewise.
* ld-powerpc/elfv2-2exe.d: Likewise.
* ld-powerpc/elfv2exe.d: Likewise.
* ld-powerpc/elfv2so.d: Likewise.
* ld-powerpc/relbrlt.d: Likewise.
* ld-powerpc/tls.g: Likewise.
* ld-powerpc/tlsexe.d: Likewise.
* ld-powerpc/tlsexe.g: Likewise.
* ld-powerpc/tlsexe.r: Likewise.
* ld-powerpc/tlsexetoc.d: Likewise.
* ld-powerpc/tlsexetoc.g: Likewise.
* ld-powerpc/tlsexetoc.r: Likewise.
* ld-powerpc/tlsso.d: Likewise.
* ld-powerpc/tlsso.g: Likewise.
* ld-powerpc/tlsso.r: Likewise.
* ld-powerpc/tlstoc.g: Likewise.
* ld-powerpc/tlstocso.d: Likewise.
* ld-powerpc/tlstocso.g: Likewise.
* ld-powerpc/tlstocso.r: Likewise.
* ld-powerpc/tocopt.d: Likewise.
* ld-powerpc/tocopt2.d: Likewise.
* ld-powerpc/tocopt3.d: Likewise.
* ld-powerpc/tocopt4.d: Likewise.
* ld-powerpc/tocopt5.d: Likewise.
41 lines
1.5 KiB
Makefile
41 lines
1.5 KiB
Makefile
#source: elfv2.s
|
|
#as: -a64
|
|
#ld: -melf64ppc --defsym f2=0x1234 --defsym f3=0x10008888 --defsym f4=0x1200000 --defsym _start=f1
|
|
#objdump: -dr
|
|
|
|
.*
|
|
|
|
Disassembly of section \.text:
|
|
|
|
0+100000c0 <.*\.plt_branch\.f2>:
|
|
.*: (3d 82 ff ff|ff ff 82 3d) addis r12,r2,-1
|
|
.*: (e9 8c 7f 28|28 7f 8c e9) ld r12,32552\(r12\)
|
|
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
|
|
.*: (4e 80 04 20|20 04 80 4e) bctr
|
|
|
|
0+100000d0 <.*\.plt_branch\.f4>:
|
|
.*: (3d 82 ff ff|ff ff 82 3d) addis r12,r2,-1
|
|
.*: (e9 8c 7f 30|30 7f 8c e9) ld r12,32560\(r12\)
|
|
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
|
|
.*: (4e 80 04 20|20 04 80 4e) bctr
|
|
|
|
0+100000e0 <_start>:
|
|
.*: (3c 40 10 02|02 10 40 3c) lis r2,4098
|
|
.*: (38 42 82 00|00 82 42 38) addi r2,r2,-32256
|
|
.*: (7c 08 02 a6|a6 02 08 7c) mflr r0
|
|
.*: (f8 21 ff e1|e1 ff 21 f8) stdu r1,-32\(r1\)
|
|
.*: (f8 01 00 30|30 00 01 f8) std r0,48\(r1\)
|
|
.*: (4b ff ff f5|f5 ff ff 4b) bl .* <_start\+0x8>
|
|
.*: (e8 62 80 08|08 80 62 e8) ld r3,-32760\(r2\)
|
|
.*: (4b ff ff c5|c5 ff ff 4b) bl .*\.plt_branch\.f2>
|
|
.*: (60 00 00 00|00 00 00 60) nop
|
|
.*: (e8 62 80 10|10 80 62 e8) ld r3,-32752\(r2\)
|
|
.*: (48 00 87 81|81 87 00 48) bl 10008888 <f3>
|
|
.*: (60 00 00 00|00 00 00 60) nop
|
|
.*: (4b ff ff c1|c1 ff ff 4b) bl .*\.plt_branch\.f4>
|
|
.*: (60 00 00 00|00 00 00 60) nop
|
|
.*: (e8 01 00 30|30 00 01 e8) ld r0,48\(r1\)
|
|
.*: (38 21 00 20|20 00 21 38) addi r1,r1,32
|
|
.*: (7c 08 03 a6|a6 03 08 7c) mtlr r0
|
|
.*: (4e 80 00 20|20 00 80 4e) blr
|