This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Copy relocation and protected symbol don't work together


I think either prohibiting such references or producing text relocs is the
only workable answer.  If a variable is marked protected, the compiler may
produce GOT-relative or PC-relative references that won't have any external
reference when linked into a DSO.  So even if the copy relocs are treated
specially, there may be no relocation in the DSO to be pointed at the
executable's copy.

I think it's also arguable that the spec says it must behave as it does
now.  The gABI doesn't say anything about copy relocs in the specification
of the STV_PROTECTED behavior.  I have not seen a version of a psABI that
is as recent as the gABI that I can read; I think the old i386 one I've
found predates the visibility additions and so obviously doesn't mention
the issue in the specification of copy relocs.  The specification is in
terms of the symbol table, and doesn't allow any special case in which a
DSO's protected symbols are searched for elsewhere.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]