This is the mail archive of the binutils@sourceware.cygnus.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]

Re: Your change to ldlang.c


   From: Mark Mitchell <mark@codesourcery.com>
   Date: Thu, 01 Jul 1999 17:58:06 -0700

     1999-06-23  Ian Lance Taylor  <ian@zembu.com>

	   * ldlang.c (section_already_linked): Only discard link once
	   sections if we are building constructors.

     This change breaks the MIPS ABI with ld -r.  The reason is
   that the .reginfo section uses SEC_LINK_ONCE to avoid duplication, and
   that is true even when doing ld -r.  In fact, I'm not sure what the
   purpose of your change was; I don't see why we should not discard link
   once sections for ld -r things.

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

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

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

Ian

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