RFC: Add STO_COPY (Re: Copy relocation and protected symbol don't work together)

H. J. Lu hjl@lucon.org
Sat Mar 29 00:38:00 GMT 2003


On Fri, Mar 28, 2003 at 04:12:37PM -0800, Richard Henderson wrote:
> On Fri, Mar 28, 2003 at 11:26:19AM -0800, H. J. Lu wrote:
> > Or we can use one bit in st_other for it.
> 
> I havn't looked at this in detail yet, but I think
> STT_COPY_OBJECT is better, since the STO_ space is
> quite limited.
> 

I tend to agree here. There are more than just x86 ABI which have
copy relocation. Should STT_COPY_OBJECT be the part of the gABI?

STO_COPY/STT_COPY_OBJECT has impact only on ld.so. The behavior of
the new binaries with STO_COPY won't change with the old ld.so.
However, the new binaries with STT_COPY_OBJECT may not work right with
the old ld.so since it may ignore STT_COPY_OBJECT definitions. One
thing ld can do is to use STT_COPY_OBJECT only when the copy relocation
is against a protected definition in DSO. But it won't work right if
the run-time DSO has a protected definition while the link-time one
doesn't. STO_COPY has no such problems. But st_other space is very
limited.


H.J.



More information about the Libc-alpha mailing list