This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: farcall-section test


On Tuesday 24 February 2009, Christophe LYON wrote:
> On 24.02.2009 04:10, Daniel Jacobowitz wrote:
> > @ Test to ensure that a ARM to ARM call exceeding 32Mb generates an error
> > @ if the destination is of type STT_SECTION (eg non-global symbol)
> >
> > Christophe, is this a limitation or a feature?  I don't know
> > why we should do this.
>
> It took me a little while to remember why...
>
> I have actually written the explanation in
> http://sourceware.org/ml/binutils/2008-05/msg00193.html
>
> In short, gas can convert some symbols in STT_SECTION in some cases. But
> after that, we can't tell whether the code pointed to by such a symbol
> is in ARM mode or in Thumb mode; hence we don't know what type of stub
> to insert.

This test is bogus. The real bug is that the user (i.e. the source assembly) 
is calling something that is not a function symbol. We should not be issuing 
these relocations in the first place, certainly not for EABI targets.

If the user is requesting call relocations against non-functions symbols then 
it really doesn't matter what we do. The code is already broken. There's 
nothing special about long branch stubs in this case, *all* call relocations 
are likely to break if the target is Thumb.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]