From 47dfb2ca058b165e333767f15a62c603830284dd Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 14 Mar 2009 09:18:22 +0000 Subject: bfd/ * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when creating a descriptor. (xcoff_sweep): Don't mark toc_section unless it's needed. (bfd_xcoff_size_dynamic_sections): Skip the toc_section when marking every bfd. (xcoff_link_input_bfd): Skip all TOC anchors. (xcoff_toc_section_p, xcoff_find_tc0): New functions. (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor to -1; call xcoff_find_tc0 instead. ld/testsuite/ * ld-powerpc/aix-toc-1.ex, ld-powerpc/aix-toc-1a.s, ld-powerpc/aix-toc-1b.s, ld-powerpc/aix-toc-1-32.dd, ld-powerpc/aix-toc-1-64.dd: New tests. * ld-powerpc/aix52.exp: Run them. --- ld/testsuite/ld-powerpc/aix-toc-1a.s | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ld/testsuite/ld-powerpc/aix-toc-1a.s (limited to 'ld/testsuite/ld-powerpc/aix-toc-1a.s') diff --git a/ld/testsuite/ld-powerpc/aix-toc-1a.s b/ld/testsuite/ld-powerpc/aix-toc-1a.s new file mode 100644 index 0000000..e67d5d3 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-toc-1a.s @@ -0,0 +1,23 @@ + .macro loadtoc + .toc + .tc sym\@[TC], \@ + + .csect .f1[PR] + .if size == 32 + lwz 1,sym\@[TC](2) + .else + ld 1,sym\@[TC](2) + .endif + .endm + + .globl .f1 + .csect .f1[PR] +.f1: + .rept 0x7ffc * 8 / size + loadtoc + .endr + + .globl f1 + .csect f1[DS] +f1: + .long .f1[PR],TOC[TC0],0 -- cgit v1.1