Browse Source
* config/tc-ppc.c (md_apply_fix): Handle defined after use toc symbols. gas/testsuite/ * gas/ppc/aix.exp: Run xcoff-toc-1 test. * gas/ppc/xcoff-toc-1.s, gas/ppc/xcoff-toc-1.d: New test.binutils-2_24-branch
6 changed files with 56 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||||
|
#as: -a32 |
||||
|
#source: xcoff-toc-1.s |
||||
|
#objdump: -dr |
||||
|
#name: XCOFF TOC reloc test 1 |
||||
|
|
||||
|
.* |
||||
|
Disassembly of section \.text: |
||||
|
|
||||
|
00000000 <\.foo>: |
||||
|
0: 80 22 00 00 l r1,0\(r2\) |
||||
|
2: R_TOC data-0x10010 |
||||
|
4: 4e 80 00 20 br |
||||
@ -0,0 +1,21 @@ |
|||||
|
.csect _rw_[RW],4 |
||||
|
.toc |
||||
|
|
||||
|
.csect .text[PR] |
||||
|
.align 2 |
||||
|
.lglobl .foo |
||||
|
.csect foo[DS] |
||||
|
foo: |
||||
|
.long .foo, TOC[tc0], 0 |
||||
|
.csect .text[PR] |
||||
|
.foo: |
||||
|
lwz 1,LC..72(2) |
||||
|
blr |
||||
|
.align 2 |
||||
|
.toc |
||||
|
LC..72: |
||||
|
.tc data[TC],data |
||||
|
.csect _rw_[RW],4 |
||||
|
.align 2 |
||||
|
data: |
||||
|
.space 0x10000 |
||||
Loading…
Reference in new issue