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: [PATCH][GAS/ARM] Better handling of difference between a symbol and an undefined symbol.


On 27/09/2010 22:37, Doug Kwan (éæå) wrote:

> The problem with the above code is that .L1 in "i - (. - L1)" is a
> forward reference.  The current code in expr() evaluate this to
> something belonging to section .data.j,  That causes a subsequent
> failure in segment check because i is defined in another section.

  This is a generically useful fix, so sorry if I'm being picky, but ..

> gas/ChangeLog:
> 2010-09-27  Doug Kwan  
> 
>         * expr.c (expr): Handle difference between a symbol and an undefined
>         symbol specially.
> 
> gas/testsuite/ChangeLog:
> 
> 2010-09-27  Doug Kwan  
> 
>         * gas/arm/got_prel2.d: New.
>         * gas/arm/got_prel2.s: New.

... the code changes behaviour for all targets, but the tests run only on ARM.
  Would it be possible to make a more generic test, perhaps based on the
example you quoted at the beginning of your email that only uses .section and
.long directives, without any target-specific opcodes in it?

    cheers,
      DaveK


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