This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: elfxx-ia64.c question
>>>>> On Fri, 24 Jan 2003 14:46:45 -0800, Richard Henderson <rth@redhat.com> said:
>> Specifically, with @secrel() an exception-entry might look like
>> this:
>>
>> .section "__ex_table", "a"
>>
>> .text [1:] INSTRUCTION_THAT MIGHT_FAULT .xdata4 "__ex_table",
>> @secrel(1b), @secrel(1f) [1:] CONTINUATION_POINT
>>
>> The Linux kernel linker script normally places the __ex_table
>> section after the .text section, such that the @secrel() entries
>> are negative and the above "bug" kicks in and silently puts all
>> zeroes in the exception table. Not very useful. I was able to
>> fix it by moving __ex_table in front of .text, but that's not a
>> very clean solution.
>>
>> It sounds to me like the linker doesn't expect @secrel() to go
>> across sections, but from my reading of the ps-ABI this is legal.
Richard> I don't think secrel really does what you want here.
I still would like to understand why BFD doesn't allow @secrel() with
negative offsets. If there is a good reason to disallow this, the
psABI should be updated to reflect this constraint. And if there
isn't a good reason, we should fix BFD.
Alan mentioned something about weak references, but I didn't fully
understand the exact circumstances he was referring to. Could someone
provide a specific example (or reason) or where things fail if
@secrel() is allowed to produce negative values?
Thanks,
--david