RFC: [PATCH] ELF: Don't require section header on ELF objects

Kaylee Blake klkblake@gmail.com
Mon Mar 9 13:45:27 GMT 2020


On 9/3/20 11:59 pm, Florian Weimer wrote:
> * Kaylee Blake:
> 
>>> I think that's conceptually the wrong thing to do for ELF, sorry.  If
>>> there is no section header, the object should be unlinkable.  The
>>> linker should not use the dynamic segment to locate the symbol
>>> information, only the dynamic section (in case the link ABI and
>>> run-time ABI are different).
>>
>> I'm confused by your comment about link and run-time ABIs differing;
>> surely if the ABI at runtime differs from the ABI at link time, you are
>> just going to crash at runtime?
> 
> No, the typical application are fewer symbols in the DSO at link time
> than at load time, for example for linking against an older version of
> glibc than is installed on the system.

How is that being done? On my machine, the symbols in glibc found
through the section header are identical to the ones found through the
dynamic array, except that some of the latter are missing symbol
versions, which I think is due to this patch not looking them up? (I'm
not actually sure if this patch does that or not).

-- 
Kaylee Blake <klkblake@gmail.com>
C is the worst language, except for all the others.



More information about the Binutils mailing list