This is the mail archive of the
mailing list for the binutils project.
Re: PATCH: Add STB_SECONDARY support
On Tue, Jul 03, 2012 at 09:26:11AM -0700, H.J. Lu wrote:
> This scheme works for simple link-time backup.
Right. I thought that's what you wanted, because run-time backup can
be done easily right now.
> It doesn't
> work with backup symbol defined in DSO. You can't override
> it at run-time.
If you want run-time backup, use a shared library for your backup.
The ELF spec has well defined search order rules for resolving
multiple global symbols in shared libraries. I'm sure you know the
rules, and could devise a way of linking a backup library.
Needing to provide a backup implementation of some function isn't a
new thing. How have we managed without secondary symbols in over 20
years since ELF was invented?
Australia Development Lab, IBM