FYI: patches for powerpc-aix...
Tristan Gingold
gingold@adacore.com
Thu May 16 08:40:00 GMT 2013
On May 16, 2013, at 1:59 AM, Alan Modra wrote:
> On Wed, May 15, 2013 at 04:38:10PM +0200, Tristan Gingold wrote:
>> bfd/
>> 2013-05-15 Tristan Gingold <gingold@adacore.com>
>>
>> * coff-rs6000.c (xcoff_howto_table): Add R_POS_16 entry.
>
> I'm a little curious as to why you didn't use the R_RL howto, which
> only differs from this one in the type and name. The type won't be
> used to set up an external reloc, will it? (And if we do get an
> external reloc, the only info I have on R_RL says "treated the same as
> the R_POS relocation type".)
>
> Also, doesn't coff64-rs6000.c need an equivalent patch?
So ok for this change ?
Tristan.
bfd/
2013-05-16 Tristan Gingold <gingold@adacore.com>
* coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_16.
* coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
gas/
2013-05-15 Tristan Gingold <gingold@adacore.com>
* config/tc-ppc.c (ppc_is_toc_sym): Symbols of class XMC_TC
are also TOC symbols.
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 0945aca..aa61afb 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -1098,7 +1098,6 @@ reloc_howto_type xcoff_howto_table[] =
0xffff, /* src_mask */
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
-
};
void
@@ -1146,6 +1145,9 @@ _bfd_xcoff_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return &xcoff_howto_table[8];
case BFD_RELOC_PPC_TOC16:
return &xcoff_howto_table[3];
+ case BFD_RELOC_16:
+ /* Note that this relocation is only internally used by gas. */
+ return &xcoff_howto_table[0xc];
case BFD_RELOC_32:
case BFD_RELOC_CTOR:
return &xcoff_howto_table[0];
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index 5f4a502..56a0d25 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1826,6 +1826,9 @@ xcoff64_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return &xcoff64_howto_table[8];
case BFD_RELOC_PPC_TOC16:
return &xcoff64_howto_table[3];
+ case BFD_RELOC_16:
+ /* Note that this relocation is only internally used by gas. */
+ return &xcoff64_howto_table[0xc];
case BFD_RELOC_32:
case BFD_RELOC_CTOR:
return &xcoff64_howto_table[0x1c];
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 904166e..a764168 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -2428,7 +2428,8 @@ static int
ppc_is_toc_sym (symbolS *sym)
{
#ifdef OBJ_XCOFF
- return symbol_get_tc (sym)->symbol_class == XMC_TC;
+ return (symbol_get_tc (sym)->symbol_class == XMC_TC
+ || symbol_get_tc (sym)->symbol_class == XMC_TC0);
#endif
#ifdef OBJ_ELF
const char *sname = segment_name (S_GET_SEGMENT (sym));
More information about the Binutils
mailing list