RFC: STO_COPY again: Re: Copy relocation and protected symbol don't work together
Roland McGrath
roland@redhat.com
Tue Apr 1 07:25:00 GMT 2003
> Since ld doesn't know if protected symbols will be involved or
> not at the run-time, are you suggesting ld should disallow copy
> relocation or DT_TEXTREL for all dynamic executables in order to
> properly support protected symbols? I don't think it is a good idea.
No, I was suggesting it only for symbols that can be seen at link time to
have STV_PROTECTED. That does not address runtime shared objects that use
STV_PROTECTED for symbols that were not protected at link time.
Basically, I think that anyone using STV_PROTECTED for mutable data items
is asking for trouble and can't necessarily get what he intends. Your
solution seems workable, but I am not really convinced that it is a mode of
use that is worth supporting rather than actively discouraging.
More information about the Libc-alpha
mailing list