This is the mail archive of the binutils@sourceware.org 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: --as-needed change wrt undefined weak symbols


On Thu, Apr 04, 2013 at 04:11:54PM -0700, H.J. Lu wrote:
> It is resolved to either 0,  if it is undefined,  or its PLT entry, if
> it is defined.  Once it is resolved to 0 at link-time, change to
> defined at run-time won't affect executable.  If it is resolved
> to defined at link-time, change it to undefined at run-time
> will lead to seg-fault.

Yes, that is a problem with any target that resolves function
addresses to a PLT entry.  For such targets, this is generally true
for any usage of weak functions in a non-PIC executable.  In other
words, the problem you raise here is entirely orthogonal to
--as-needed behaviour.

-- 
Alan Modra
Australia Development Lab, IBM


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