2
0
mirror of https://sourceware.org/git/binutils-gdb.git synced 2024-12-21 04:42:53 +08:00
binutils-gdb/ld/testsuite/ld-powerpc/aix-glink-2-64.dd
Richard Sandiford 8602d4fea6 include/coff/
* internal.h (C_AIX_WEAKEXT): New macro.
	(C_WEAKEXT): Use the GNU definition in the generic part of the file,
	and conditionally reset it to C_AIX_WEAKEXT in the XCOFF part of
	the file.
	(CSECT_SYM_P): New macro.
	* xcoff.h (L_WEAK): Define.
	(EXTERN_SYM_P): New macro.

bfd/
	* coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
	check whether a symbol has csect information.
	(coff_print_aux): Likewise.
	* coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
	information for C_AIX_WEAKEXT too.
	(_bfd_xcoff_swap_aux_out): Likewise.
	(xcoff_reloc_type_br): Handle defweak symbols too.
	* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
	information for C_AIX_WEAKEXT too.
	(_bfd_xcoff64_swap_aux_out): Likewise.
	(xcoff64_reloc_type_br): Handle defweak symbols too.
	* coffgen.c (coff_print_symbol): Handle auxillary function
	information for C_AIX_WEAKEXT too.
	* xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
	instead of BSF_GLOBAL if the L_WEAK flag is set.
	(xcoff_dynamic_definition_p): New function.
	(xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
	defines h.  Don't change h if ldsym isn't the definition.  Otherwise,
	always take the symbol class from the ldsym.  Use weak bfd symbol
	types for weak ldsyms.
	(xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
	Fix the check for whether a definition is from a shared object.
	Allow redefinitions of weak symbols.
	(xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
	(xcoff_keep_symbol_p): Likewise.
	(bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
	(xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
	Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
	but mark them as L_WEAK.
	(xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
	instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.

gas/
	* config/tc-ppc.c (ppc_frob_symbol): Add csect information for
	C_AIX_WEAKEXT too.

ld/testsuite/
	* ld-powerpc/aix-glink-2a.s, ld-powerpc/aix-glink-2a.ex,
	ld-powerpc/aix-glink-2b.s, ld-powerpc/aix-glink-2c.s,
	ld-powerpc/aix-glink-2c.ex, ld-powerpc/aix-glink-2d.s,
	ld-powerpc/aix-glink-2-32.dd, ld-powerpc/aix-glink-2-64.dd,
	ld-powerpc/aix-weak-1a.s, ld-powerpc/aix-weak-1b.s,
	ld-powerpc/aix-weak-1-rel.hd, ld-powerpc/aix-weak-1-rel.nd,
	ld-powerpc/aix-weak-1-dso.hd, ld-powerpc/aix-weak-1-dso.nd,
	ld-powerpc/aix-weak-1-dso.dnd, ld-powerpc/aix-weak-1.ex,
	ld-powerpc/aix-weak-2a.s, ld-powerpc/aix-weak-2a.ex,
	ld-powerpc/aix-weak-2a.nd, ld-powerpc/aix-weak-2b.s,
	ld-powerpc/aix-weak-2b.nd, ld-powerpc/aix-weak-2c.s,
	ld-powerpc/aix-weak-2c.ex, ld-powerpc/aix-weak-2c.nd,
	ld-powerpc/aix-weak-2c.od, ld-powerpc/aix-weak-3a.s,
	ld-powerpc/aix-weak-3a.ex, ld-powerpc/aix-weak-3b.s,
	ld-powerpc/aix-weak-3b.ex, ld-powerpc/aix-weak-3-32.d,
	ld-powerpc/aix-weak-3-32.dd, ld-powerpc/aix-weak-3-64.d,
	ld-powerpc/aix-weak-3-64.dd: New tests.
	* ld-powerpc/aix52.exp: Run them.  Replace tmp/aix-* with
	tmp/aix64-* in 64-bit ld options.
2009-03-14 09:34:27 +00:00

74 lines
2.4 KiB
Plaintext

tmpdir/aix64-glink-2: file format aix5coff64-rs6000
Disassembly of section \.text:
0000000010000000 <\.b1>:
10000000: 60 00 00 00 nop
0000000010000004 <\.b2>:
10000004: 60 00 00 00 nop
0000000010000008 <\.b3>:
10000008: 60 00 00 00 nop
000000001000000c <\.main>:
1000000c: 48 00 f1 03 bla f100 <.*>
10000010: 48 00 00 21 bl 10000030 <\.a2>
10000014: 48 00 00 45 bl 10000058 <\.a3>
10000018: 4b ff ff e9 bl 10000000 <\.b1>
1000001c: 4b ff ff e9 bl 10000004 <\.b2>
10000020: 4b ff ff e9 bl 10000008 <\.b3>
10000024: 48 00 f5 03 bla f500 <.*>
10000028: 48 00 00 59 bl 10000080 <\.c2>
1000002c: 48 00 00 7d bl 100000a8 <\.c3>
0000000010000030 <\.a2>:
10000030: e9 82 00 00 ld r12,0\(r2\)
10000034: f8 41 00 28 std r2,40\(r1\)
10000038: e8 0c 00 00 ld r0,0\(r12\)
1000003c: e8 4c 00 08 ld r2,8\(r12\)
10000040: 7c 09 03 a6 mtctr r0
10000044: 4e 80 04 20 bctr
10000048: 00 00 00 00 \.long 0x0
1000004c: 00 0c a0 00 \.long 0xca000
10000050: 00 00 00 00 \.long 0x0
10000054: 00 00 00 18 \.long 0x18
0000000010000058 <\.a3>:
10000058: e9 82 00 08 ld r12,8\(r2\)
1000005c: f8 41 00 28 std r2,40\(r1\)
10000060: e8 0c 00 00 ld r0,0\(r12\)
10000064: e8 4c 00 08 ld r2,8\(r12\)
10000068: 7c 09 03 a6 mtctr r0
1000006c: 4e 80 04 20 bctr
10000070: 00 00 00 00 \.long 0x0
10000074: 00 0c a0 00 \.long 0xca000
10000078: 00 00 00 00 \.long 0x0
1000007c: 00 00 00 18 \.long 0x18
0000000010000080 <\.c2>:
10000080: e9 82 00 10 ld r12,16\(r2\)
10000084: f8 41 00 28 std r2,40\(r1\)
10000088: e8 0c 00 00 ld r0,0\(r12\)
1000008c: e8 4c 00 08 ld r2,8\(r12\)
10000090: 7c 09 03 a6 mtctr r0
10000094: 4e 80 04 20 bctr
10000098: 00 00 00 00 \.long 0x0
1000009c: 00 0c a0 00 \.long 0xca000
100000a0: 00 00 00 00 \.long 0x0
100000a4: 00 00 00 18 \.long 0x18
00000000100000a8 <\.c3>:
100000a8: e9 82 00 18 ld r12,24\(r2\)
100000ac: f8 41 00 28 std r2,40\(r1\)
100000b0: e8 0c 00 00 ld r0,0\(r12\)
100000b4: e8 4c 00 08 ld r2,8\(r12\)
100000b8: 7c 09 03 a6 mtctr r0
100000bc: 4e 80 04 20 bctr
100000c0: 00 00 00 00 \.long 0x0
100000c4: 00 0c a0 00 \.long 0xca000
100000c8: 00 00 00 00 \.long 0x0
100000cc: 00 00 00 18 \.long 0x18