This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: RFC: STO_COPY again: Re: Copy relocation and protected symbol don't work together
- From: Roland McGrath <roland at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: GNU C Library <libc-alpha at sources dot redhat dot com>,binutils at sources dot redhat dot com
- Date: Mon, 31 Mar 2003 23:25:02 -0800
- Subject: Re: RFC: STO_COPY again: Re: Copy relocation and protected symbol don't work together
> 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.