2013-10-29 06:10:34 +00:00
|
|
|
#source: elfv2.s
|
|
|
|
#as: -a64
|
|
|
|
#ld: -melf64ppc -shared
|
|
|
|
#objdump: -dr
|
|
|
|
|
|
|
|
.*
|
|
|
|
|
|
|
|
Disassembly of section \.text:
|
|
|
|
|
Reorder more powerpc64 sections for -z relro
This moves .got too, which requires .sdata and .sbss to move with it,
because these sections share addressing via the toc pointer and with
small-model code must be within a 16-bit signed offset. .plt, .iplt
and .branch_lt must also be moved since they are addressed via a
32-bit offset from the toc pointer, and we might have a very large
.data section.
This change means we may have some bss style sections before the data
segment, necessitating another PT_LOAD header. Also, since _edata is
defined at the end of the data segment it's possible with an empty
.data to have _edata at the end of .plt which looks a little unusual
since .plt is a bss style section. That should only happen rarely in
real world binaries, but does occur in the ld testsuite.
ld/
* emulparams/elf64ppc.sh (BSS_PLT): Don't define.
(OTHER_READWRITE_SECTIONS): Move .branch_lt to..
(OTHER_RELRO_SECTIONS_2): ..here.
(DATA_GOT, SEPARATE_GOTPLT, DATA_SDATA, DATA_PLT,
PLT_BEFORE_GOT): Define.
* scripttempl/elf.sc: Handle DATA_SDATA and DATA_GOT/DATA_PLT/
PLT_BEFORE_GOT combination.
(DATA_GOT, SDATA_GOT): Don't define if either is already defined.
ld/testsuite/
* ld-powerpc/ambiguousv1.d,
* ld-powerpc/ambiguousv1b.d,
* ld-powerpc/ambiguousv2.d,
* ld-powerpc/ambiguousv2b.d,
* ld-powerpc/elfv2exe.d,
* ld-powerpc/elfv2so.d,
* ld-powerpc/tlsexe.r,
* ld-powerpc/tlsexetoc.r,
* ld-powerpc/tlsso.r,
* ld-powerpc/tlstocso.r: Update.
2015-01-20 06:49:15 +00:00
|
|
|
0+320 <.*\.plt_call\.f4>:
|
2015-04-21 09:48:24 +00:00
|
|
|
.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
|
|
|
|
.*: (e9 82 80 38|38 80 82 e9) ld r12,-32712\(r2\)
|
|
|
|
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
|
|
|
|
.*: (4e 80 04 20|20 04 80 4e) bctr
|
2013-10-29 06:10:34 +00:00
|
|
|
|
Reorder more powerpc64 sections for -z relro
This moves .got too, which requires .sdata and .sbss to move with it,
because these sections share addressing via the toc pointer and with
small-model code must be within a 16-bit signed offset. .plt, .iplt
and .branch_lt must also be moved since they are addressed via a
32-bit offset from the toc pointer, and we might have a very large
.data section.
This change means we may have some bss style sections before the data
segment, necessitating another PT_LOAD header. Also, since _edata is
defined at the end of the data segment it's possible with an empty
.data to have _edata at the end of .plt which looks a little unusual
since .plt is a bss style section. That should only happen rarely in
real world binaries, but does occur in the ld testsuite.
ld/
* emulparams/elf64ppc.sh (BSS_PLT): Don't define.
(OTHER_READWRITE_SECTIONS): Move .branch_lt to..
(OTHER_RELRO_SECTIONS_2): ..here.
(DATA_GOT, SEPARATE_GOTPLT, DATA_SDATA, DATA_PLT,
PLT_BEFORE_GOT): Define.
* scripttempl/elf.sc: Handle DATA_SDATA and DATA_GOT/DATA_PLT/
PLT_BEFORE_GOT combination.
(DATA_GOT, SDATA_GOT): Don't define if either is already defined.
ld/testsuite/
* ld-powerpc/ambiguousv1.d,
* ld-powerpc/ambiguousv1b.d,
* ld-powerpc/ambiguousv2.d,
* ld-powerpc/ambiguousv2b.d,
* ld-powerpc/elfv2exe.d,
* ld-powerpc/elfv2so.d,
* ld-powerpc/tlsexe.r,
* ld-powerpc/tlsexetoc.r,
* ld-powerpc/tlsso.r,
* ld-powerpc/tlstocso.r: Update.
2015-01-20 06:49:15 +00:00
|
|
|
0+330 <.*\.plt_call\.f3>:
|
2015-04-21 09:48:24 +00:00
|
|
|
.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
|
|
|
|
.*: (e9 82 80 28|28 80 82 e9) ld r12,-32728\(r2\)
|
|
|
|
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
|
|
|
|
.*: (4e 80 04 20|20 04 80 4e) bctr
|
2013-10-29 06:10:34 +00:00
|
|
|
|
Reorder more powerpc64 sections for -z relro
This moves .got too, which requires .sdata and .sbss to move with it,
because these sections share addressing via the toc pointer and with
small-model code must be within a 16-bit signed offset. .plt, .iplt
and .branch_lt must also be moved since they are addressed via a
32-bit offset from the toc pointer, and we might have a very large
.data section.
This change means we may have some bss style sections before the data
segment, necessitating another PT_LOAD header. Also, since _edata is
defined at the end of the data segment it's possible with an empty
.data to have _edata at the end of .plt which looks a little unusual
since .plt is a bss style section. That should only happen rarely in
real world binaries, but does occur in the ld testsuite.
ld/
* emulparams/elf64ppc.sh (BSS_PLT): Don't define.
(OTHER_READWRITE_SECTIONS): Move .branch_lt to..
(OTHER_RELRO_SECTIONS_2): ..here.
(DATA_GOT, SEPARATE_GOTPLT, DATA_SDATA, DATA_PLT,
PLT_BEFORE_GOT): Define.
* scripttempl/elf.sc: Handle DATA_SDATA and DATA_GOT/DATA_PLT/
PLT_BEFORE_GOT combination.
(DATA_GOT, SDATA_GOT): Don't define if either is already defined.
ld/testsuite/
* ld-powerpc/ambiguousv1.d,
* ld-powerpc/ambiguousv1b.d,
* ld-powerpc/ambiguousv2.d,
* ld-powerpc/ambiguousv2b.d,
* ld-powerpc/elfv2exe.d,
* ld-powerpc/elfv2so.d,
* ld-powerpc/tlsexe.r,
* ld-powerpc/tlsexetoc.r,
* ld-powerpc/tlsso.r,
* ld-powerpc/tlstocso.r: Update.
2015-01-20 06:49:15 +00:00
|
|
|
0+340 <.*\.plt_call\.f2>:
|
2015-04-21 09:48:24 +00:00
|
|
|
.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
|
|
|
|
.*: (e9 82 80 30|30 80 82 e9) ld r12,-32720\(r2\)
|
|
|
|
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
|
|
|
|
.*: (4e 80 04 20|20 04 80 4e) bctr
|
2013-10-29 06:10:34 +00:00
|
|
|
|
Reorder more powerpc64 sections for -z relro
This moves .got too, which requires .sdata and .sbss to move with it,
because these sections share addressing via the toc pointer and with
small-model code must be within a 16-bit signed offset. .plt, .iplt
and .branch_lt must also be moved since they are addressed via a
32-bit offset from the toc pointer, and we might have a very large
.data section.
This change means we may have some bss style sections before the data
segment, necessitating another PT_LOAD header. Also, since _edata is
defined at the end of the data segment it's possible with an empty
.data to have _edata at the end of .plt which looks a little unusual
since .plt is a bss style section. That should only happen rarely in
real world binaries, but does occur in the ld testsuite.
ld/
* emulparams/elf64ppc.sh (BSS_PLT): Don't define.
(OTHER_READWRITE_SECTIONS): Move .branch_lt to..
(OTHER_RELRO_SECTIONS_2): ..here.
(DATA_GOT, SEPARATE_GOTPLT, DATA_SDATA, DATA_PLT,
PLT_BEFORE_GOT): Define.
* scripttempl/elf.sc: Handle DATA_SDATA and DATA_GOT/DATA_PLT/
PLT_BEFORE_GOT combination.
(DATA_GOT, SDATA_GOT): Don't define if either is already defined.
ld/testsuite/
* ld-powerpc/ambiguousv1.d,
* ld-powerpc/ambiguousv1b.d,
* ld-powerpc/ambiguousv2.d,
* ld-powerpc/ambiguousv2b.d,
* ld-powerpc/elfv2exe.d,
* ld-powerpc/elfv2so.d,
* ld-powerpc/tlsexe.r,
* ld-powerpc/tlsexetoc.r,
* ld-powerpc/tlsso.r,
* ld-powerpc/tlstocso.r: Update.
2015-01-20 06:49:15 +00:00
|
|
|
0+350 <.*\.plt_call\.f1>:
|
2015-04-21 09:48:24 +00:00
|
|
|
.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
|
|
|
|
.*: (e9 82 80 40|40 80 82 e9) ld r12,-32704\(r2\)
|
|
|
|
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
|
|
|
|
.*: (4e 80 04 20|20 04 80 4e) bctr
|
2013-10-29 06:10:34 +00:00
|
|
|
|
Reorder more powerpc64 sections for -z relro
This moves .got too, which requires .sdata and .sbss to move with it,
because these sections share addressing via the toc pointer and with
small-model code must be within a 16-bit signed offset. .plt, .iplt
and .branch_lt must also be moved since they are addressed via a
32-bit offset from the toc pointer, and we might have a very large
.data section.
This change means we may have some bss style sections before the data
segment, necessitating another PT_LOAD header. Also, since _edata is
defined at the end of the data segment it's possible with an empty
.data to have _edata at the end of .plt which looks a little unusual
since .plt is a bss style section. That should only happen rarely in
real world binaries, but does occur in the ld testsuite.
ld/
* emulparams/elf64ppc.sh (BSS_PLT): Don't define.
(OTHER_READWRITE_SECTIONS): Move .branch_lt to..
(OTHER_RELRO_SECTIONS_2): ..here.
(DATA_GOT, SEPARATE_GOTPLT, DATA_SDATA, DATA_PLT,
PLT_BEFORE_GOT): Define.
* scripttempl/elf.sc: Handle DATA_SDATA and DATA_GOT/DATA_PLT/
PLT_BEFORE_GOT combination.
(DATA_GOT, SDATA_GOT): Don't define if either is already defined.
ld/testsuite/
* ld-powerpc/ambiguousv1.d,
* ld-powerpc/ambiguousv1b.d,
* ld-powerpc/ambiguousv2.d,
* ld-powerpc/ambiguousv2b.d,
* ld-powerpc/elfv2exe.d,
* ld-powerpc/elfv2so.d,
* ld-powerpc/tlsexe.r,
* ld-powerpc/tlsexetoc.r,
* ld-powerpc/tlsso.r,
* ld-powerpc/tlstocso.r: Update.
2015-01-20 06:49:15 +00:00
|
|
|
0+360 <f1>:
|
2015-04-21 09:48:24 +00:00
|
|
|
.*: (3c 4c 00 02|02 00 4c 3c) addis r2,r12,2
|
|
|
|
.*: (38 42 82 a0|a0 82 42 38) addi r2,r2,-32096
|
|
|
|
.*: (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 dd|dd ff ff 4b) bl .*\.plt_call\.f1>
|
|
|
|
.*: (e8 62 80 08|08 80 62 e8) ld r3,-32760\(r2\)
|
|
|
|
.*: (4b ff ff c5|c5 ff ff 4b) bl .*\.plt_call\.f2>
|
|
|
|
.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\)
|
|
|
|
.*: (e8 62 80 10|10 80 62 e8) ld r3,-32752\(r2\)
|
|
|
|
.*: (4b ff ff a9|a9 ff ff 4b) bl .*\.plt_call\.f3>
|
|
|
|
.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\)
|
|
|
|
.*: (4b ff ff 91|91 ff ff 4b) bl .*\.plt_call\.f4>
|
|
|
|
.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\)
|
|
|
|
.*: (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
|
|
|
|
.*: (00 00 00 00|60 02 01 00) .*
|
|
|
|
.*: (00 01 02 60|00 00 00 00) .*
|
2013-10-29 06:10:34 +00:00
|
|
|
|
Reorder more powerpc64 sections for -z relro
This moves .got too, which requires .sdata and .sbss to move with it,
because these sections share addressing via the toc pointer and with
small-model code must be within a 16-bit signed offset. .plt, .iplt
and .branch_lt must also be moved since they are addressed via a
32-bit offset from the toc pointer, and we might have a very large
.data section.
This change means we may have some bss style sections before the data
segment, necessitating another PT_LOAD header. Also, since _edata is
defined at the end of the data segment it's possible with an empty
.data to have _edata at the end of .plt which looks a little unusual
since .plt is a bss style section. That should only happen rarely in
real world binaries, but does occur in the ld testsuite.
ld/
* emulparams/elf64ppc.sh (BSS_PLT): Don't define.
(OTHER_READWRITE_SECTIONS): Move .branch_lt to..
(OTHER_RELRO_SECTIONS_2): ..here.
(DATA_GOT, SEPARATE_GOTPLT, DATA_SDATA, DATA_PLT,
PLT_BEFORE_GOT): Define.
* scripttempl/elf.sc: Handle DATA_SDATA and DATA_GOT/DATA_PLT/
PLT_BEFORE_GOT combination.
(DATA_GOT, SDATA_GOT): Don't define if either is already defined.
ld/testsuite/
* ld-powerpc/ambiguousv1.d,
* ld-powerpc/ambiguousv1b.d,
* ld-powerpc/ambiguousv2.d,
* ld-powerpc/ambiguousv2b.d,
* ld-powerpc/elfv2exe.d,
* ld-powerpc/elfv2so.d,
* ld-powerpc/tlsexe.r,
* ld-powerpc/tlsexetoc.r,
* ld-powerpc/tlsso.r,
* ld-powerpc/tlstocso.r: Update.
2015-01-20 06:49:15 +00:00
|
|
|
0+3b0 <__glink_PLTresolve>:
|
2015-04-21 09:48:24 +00:00
|
|
|
.*: (7c 08 02 a6|a6 02 08 7c) mflr r0
|
|
|
|
.*: (42 9f 00 05|05 00 9f 42) bcl .*
|
|
|
|
.*: (7d 68 02 a6|a6 02 68 7d) mflr r11
|
|
|
|
.*: (e8 4b ff f0|f0 ff 4b e8) ld r2,-16\(r11\)
|
|
|
|
.*: (7c 08 03 a6|a6 03 08 7c) mtlr r0
|
|
|
|
.*: (7d 8b 60 50|50 60 8b 7d) subf r12,r11,r12
|
|
|
|
.*: (7d 62 5a 14|14 5a 62 7d) add r11,r2,r11
|
|
|
|
.*: (38 0c ff d0|d0 ff 0c 38) addi r0,r12,-48
|
|
|
|
.*: (e9 8b 00 00|00 00 8b e9) ld r12,0\(r11\)
|
|
|
|
.*: (78 00 f0 82|82 f0 00 78) rldicl r0,r0,62,2
|
|
|
|
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
|
|
|
|
.*: (e9 6b 00 08|08 00 6b e9) ld r11,8\(r11\)
|
|
|
|
.*: (4e 80 04 20|20 04 80 4e) bctr
|
|
|
|
.*: (60 00 00 00|00 00 00 60) nop
|
2013-10-29 06:10:34 +00:00
|
|
|
|
|
|
|
.* <f3@plt>:
|
2015-04-21 09:48:24 +00:00
|
|
|
.*: (4b ff ff c8|c8 ff ff 4b) b .* <__glink_PLTresolve>
|
2013-10-29 06:10:34 +00:00
|
|
|
|
|
|
|
.* <f2@plt>:
|
2015-04-21 09:48:24 +00:00
|
|
|
.*: (4b ff ff c4|c4 ff ff 4b) b .* <__glink_PLTresolve>
|
2013-10-29 06:10:34 +00:00
|
|
|
|
|
|
|
.* <f4@plt>:
|
2015-04-21 09:48:24 +00:00
|
|
|
.*: (4b ff ff c0|c0 ff ff 4b) b .* <__glink_PLTresolve>
|
2013-10-29 06:10:34 +00:00
|
|
|
|
|
|
|
.* <f1@plt>:
|
2015-04-21 09:48:24 +00:00
|
|
|
.*: (4b ff ff bc|bc ff ff 4b) b .* <__glink_PLTresolve>
|