Your change to ldlang.c

Mark Mitchell mark@codesourcery.com
Thu Jul 1 20:25:00 GMT 1999


>>>>> "Ian" == Ian Lance Taylor <ian@zembu.com> writes:

    Ian> I thought it was discussed on the list a bit, but I can't
    Ian> find the messages, so it must have been somewhere else.
    Ian> Richard, do you remember?

I vaguely remember you mentioning the patch, but I don't recall the
discussion. 

    Ian> My main concern was that it would mess up relocations.  If an
    Ian> input section disappears, relocations against symbols in that
    Ian> section need to be adjusted to use different symbols, and
    Ian> relocations for that section need to disappear.  I doubt the
    Ian> backends do either of these correctly.

I see.  Of course, in this case, there are no relocations against the
section.  

I guess I don't see why your solution is really any better.  On the
one hand, we may have bogus relocations.  On the other, we've violated
the SEC_LINK_ONCE semantics, especially for fixed-sized sections like
.reginfo. 

I guess I'm thinking we should undo your change, and then attack the
problem of making the back-ends handle the relocations correctly.
That should not be *that* hard.

    Ian> We could go back to letting the emultempl file handle the
    Ian> .reginfo sections for MIPS files when doing a relocateable
    Ian> link, I suppose.  Does anybody have a better suggestion?

I don't know what you mean by this suggestion.  I guess I'm too new to
binutils-land.  Could you elaborate on the emultempl file solution?

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Binutils mailing list