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]: Allow relative calculations for non-R_*_RELATIVE relocs.


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


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