This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFA] ARM OABI - pc-relative relocations
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: Jerome Guitton <guitton at act-europe dot fr>, <Richard dot Earnshaw at arm dot com>, <binutils at sources dot redhat dot com>
- Date: Mon, 15 Dec 2003 17:13:06 -0800
- Subject: Re: [RFA] ARM OABI - pc-relative relocations
- References: <Pine.BSF.4.44.0312151824380.79679-100000@dair.pair.com>
Hans-Peter Nilsson <hp@bitrange.com> writes:
> On Mon, 15 Dec 2003, Zack Weinberg wrote:
>> Index: gas/config/tc-arm.c
>> --- gas/config/tc-arm.c 26 Nov 2003 05:10:06 -0000 1.1.3.1.2.1
>> +++ gas/config/tc-arm.c 1 Dec 2003 08:00:23 -0000 1.1.3.1.2.2
>> @@ -11274,7 +11274,19 @@ md_apply_fix3 (fixP, valP, seg)
>> as_bad_where (fixP->fx_file, fixP->fx_line,
>> _("out of range branch"));
>>
>> - newval = (value & 0x00ffffff) | (newval & 0xff000000);
>> + if (seg->use_rela_p && !fixP->fx_done)
>
> I don't see use_rela_p defined in FSF CVS (expecting a
> TC_SEGMENT_INFO_TYPE definition in tc-arm.h and a #define
> tc_segment_info_data use_rela_p -- of course you didn't hack
> gas/seg.h for this! ;-)
Huh? grep says it's right there in bfd/section.c (which is used to
generate bfd/bfd-in2.h):
.typedef struct bfd_section
.{
[...]
. {* Nonzero if this section uses RELA relocations, rather than REL. *}
. unsigned int use_rela_p:1;
[...]
.} asection;
[I have to say that I find the way bfd generates files from other
files to be deeply counter-intuitive.]
There is no gas/seg.h but gas/as.h has
#ifndef BFD_ASSEMBLER
... junk ...
#else
typedef asection *segT;
... etc ...
#endif
zw