This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Your change to ldlang.c
>>>>> "Ian" == Ian Lance Taylor <ian@zembu.com> writes:
Ian> Well, I wrote that comment in the first place. The fact that
Ian> I forgot to think about ld -r then doesn't necessarily imply
Ian> that I am wrong now.
True 'nuff.
Ian> My concern is related to relocations in other input sections
Ian> which refer to symbols defined in the input section being
Ian> discarded, particularly if those relocations refer to local
Ian> symbols in the section being discarded. The correct
Ian> semantics would seem to be to convert those relocations to
Ian> instead refer to the link once section which is being kept.
OK, now I see what's worrying you. Obviously, a local symbol in the
LINK_ONCE section can only be a problem if it is referred to by
something outside the LINK_ONCE section. The semantics of that are
really weird, anyhow, IMHO, although I am by no means a PE expert.
(I've actually researched PE to some degree, but by no means
exhaustively, in the past.)
Ian> Actually, I'm going to revert my ld -r change, at least for
Ian> now. You've convinced me that it will never do the right
Ian> thing as it stands, whereas removing it will at least
Ian> sometimes do the right thing. We can put it back again if we
Ian> figure out some different way to solve the problems that it
Ian> causes.
Thanks!
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com