This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH]: Allow relative calculations for non-R_*_RELATIVE relocs.
- From: Ian Lance Taylor <iant at google dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: binutils at sourceware dot org
- Date: Thu, 11 Feb 2010 20:48:03 -0800
- Subject: Re: [PATCH]: Allow relative calculations for non-R_*_RELATIVE relocs.
- References: <20100211.124855.241808752.davem@davemloft.net>
David Miller <davem@davemloft.net> writes:
> Ok Ian, this is what I came up with.
>
> With this and the included sparc target changes, the entire GOLD
> testsuite as of two days ago passes for me on sparc.
>
> Once this is settled I'll hit those new testcases you added over the
> past few days.
>
> If you don't like the new attribute name, I can easily change it to
> something you think is more appropriate.
This looks basically good, but, yeah, I don't like the name. A
relative reloc means one that is relative to the base address, which
is not what is going on here. What you've got are relocs that don't
use a symbol for the relocation, but which get their addend from a
symbol.
Suppose we call the new field in Output_reloc<SHT_REL> is_symbolless_.
The corresponding parameter names would change as well. Then instead
of new add_global_relative and add_local_relative functions in
Output_data_reloc, we would have add_symbolless_global_addend and
add_symbolless_local_addend.
Does that sound reasonable?
Thanks.
Ian