This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ARM long branch stubs: shared libs
On Fri, Apr 03, 2009 at 11:28:03AM +0200, Christophe LYON wrote:
>> This part is correct. The comment is not clear, but the goal is to
>> mark undefined weak symbols as dynamic at this point. Branches should
>> go to the PLT entry. I'm not sure what happens if you call that PLT
>> entry, though, and there is no definition at runtime. Ideally,
>> nothing would happen, but I'm sure glibc does not implement that.
>>
> I have read again the ELF spec and discovered that indeed weak symbols
> are preemtible and thus need to use a PLT entry.
Sometimes - I believe when is implementation defined. I know they are
preemptible in shared libraries, but I remember ld making the decision
at link time for non-shared libraries on some platform.
>> Is this a hitherto undiscovered requirement on the ARM dynamic linker?
> Isn't this requirement common to all targets?
No. The "call to a weak symbol jumps to next instruction" requirement
is specific to the ARM EABI.
--
Daniel Jacobowitz
CodeSourcery