Preventing preemption of 'protected' symbols in GNU ld 2.26
H.J. Lu
hjl.tools@gmail.com
Thu Mar 24 16:42:00 GMT 2016
On Thu, Mar 24, 2016 at 9:06 AM, Cary Coutant <ccoutant@gmail.com> wrote:
>> I disagree. Protected means that it won't be preempted. It
>> doesn't mean the address of protected symbol will be local.
>> With copy relocation, the run-time address of the protected
>> symbol can be in executable. There are a couple run-time
>> tests in glibc to verify it. See:
>>
>> https://sourceware.org/bugzilla/show_bug.cgi?id=17711
>
> No. You can't just redefine away the meaning of "must resolve to a
> definition in that component." A COPY relocation makes a new
> definition in the main program and that new definition pre-empts the
> one in the shared library. That breaks everything that the rule in the
> gABI was designed to allow.
>
What you are proposing is to disallow copy relocation against
protected symbol. Am I correct?
--
H.J.
More information about the Binutils
mailing list