mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
c5df7e442e
bfd PR binutils/21700 * reloc.c (BFD_RELOC_PPC_NEG): New relocation. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler. (xcoff_reloc_type_neg): Correctly substract addend. * coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32 howto. (xcoff64_rtype2howto): Add handler for R_NEG_32. (xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler. * xcofflink.c (xcoff_need_ldrel_p): Check output section for R_POS-like relocations. New argument added. (xcoff_mark): Adapt to new xcoff_need_ldrel_p argument. (xcoff_link_input_bfd): Likewise. gas * config/tc-ppc.c (ppc_get_csect_to_adjust): New function. (ppc_fix_adjustable): Manage fx_subsy part. (tc_gen_reloc): Create second relocation when both fx_addsy and fx_subsy are provided. * config/tc-ppc.h (RELOC_EXPANSION_POSSIBLE): New define. (MAX_RELOC_EXPANSION): Likewise. (TC_FORCE_RELOCATION_SUB_SAME): Likewise (UNDEFINED_DIFFERENCE_OK): Likewise * testsuite/gas/all/gas.exp: Skip difference between two undefined symbols test. ld * testsuite/ld-powerpc/aix52.exp: Add new test. * testsuite/ld-powerpc/aix-neg-reloc-32.d: New test. * testsuite/ld-powerpc/aix-neg-reloc-64.d: New test. * testsuite/ld-powerpc/aix-neg-reloc.ex: New test. * testsuite/ld-powerpc/aix-neg-reloc.s: New test.
24 lines
451 B
Makefile
24 lines
451 B
Makefile
#source: aix-tls-reloc.s
|
|
#as: -a32
|
|
#ld: -b32 -shared -bE:aix-tls-reloc.ex
|
|
#objdump: -dr
|
|
#target: [is_xcoff_format]
|
|
|
|
.*
|
|
|
|
Disassembly of section \.text:
|
|
|
|
.* <.foo>:
|
|
.*: 4e 80 00 20 blr
|
|
.*: R_REF _foo.ro_-.*
|
|
.*: 60 00 00 00 nop
|
|
.*: 60 00 00 00 nop
|
|
.*: 60 00 00 00 nop
|
|
.* <_GLOBAL__F_foo>:
|
|
.*: ff ff ff ff fnmadd. f31,f31,f31,f31
|
|
.*: R_POS_64 .text-.*
|
|
.*: R_NEG _foo.ro_-.*
|
|
.*: ff ff ff f0 .long 0xfffffff0
|
|
.*: 60 00 00 00 nop
|
|
.*: 60 00 00 00 nop
|