This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][GAS/ARM] Better handling of difference between a symbol and an undefined symbol.
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: "Doug Kwan (éæå)" <dougkwan at google dot com>
- Cc: binutils <binutils at sourceware dot org>, Richard Earnshaw <rearnsha at arm dot com>, Nick Clifton <nickc at redhat dot com>
- Date: Tue, 28 Sep 2010 01:12:39 +0100
- Subject: Re: [PATCH][GAS/ARM] Better handling of difference between a symbol and an undefined symbol.
- References: <AANLkTimk7gM-4et8UwjUPn28f0qn6L05RrS=GkEw2GE_@mail.gmail.com>
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