public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* -Bsymbolic is broken in ld
@ 1996-01-29  8:32 H J Lu
  1996-01-29 11:29 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: H J Lu @ 1996-01-29  8:32 UTC (permalink / raw)
  To: Ian Lance Taylor, Eric Youngdale; +Cc: gas2

Hi,

I think -Bsymbolic in ld is broken. It doesn't work in most cases.
May I suggest one approach?

1. Remove all the old -Bsymbolic stuff, except for setting DT_SYMBOLIC.
2. Add the BSF_SYMBOLIC bit to the symbol flag in addition to
   BSF_GLOBAL, BSF_WEAK, BSF_LOCAL, ...
3. If the BSF_SYMBOLIC bit is set, the symbol is treated just
   like a local symbol.
3. When writing to the disk, clear the BSF_SYMBOLIC bit.

Ian, Eric, will that work? I really like to see -Bsymbolic get fixed.

Thanks a lot.

-- 
H.J. Lu (hjl@gnu.ai.mit.edu)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: -Bsymbolic is broken in ld
  1996-01-29  8:32 -Bsymbolic is broken in ld H J Lu
@ 1996-01-29 11:29 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 1996-01-29 11:29 UTC (permalink / raw)
  To: hjl; +Cc: eric, gas2

   From: H J Lu <hjl@zoom.com>
   Date: Mon, 29 Jan 1996 08:32:24 -0800 (PST)

   I think -Bsymbolic in ld is broken. It doesn't work in most cases.

I just checked in a patch which fixes the case I know of, namely the
problem you sent me.  Please let me know if there are any other
problems.

   May I suggest one approach?

   1. Remove all the old -Bsymbolic stuff, except for setting DT_SYMBOLIC.
   2. Add the BSF_SYMBOLIC bit to the symbol flag in addition to
      BSF_GLOBAL, BSF_WEAK, BSF_LOCAL, ...
   3. If the BSF_SYMBOLIC bit is set, the symbol is treated just
      like a local symbol.
   3. When writing to the disk, clear the BSF_SYMBOLIC bit.

   Ian, Eric, will that work? I really like to see -Bsymbolic get fixed.

This is more complex than the current approach.  The trick is in step
3, in knowing when to treat the symbol as local and when to treat it
as global.  When you have determined that, it is just as easy to
simply check whether the -Bsymbolic flag was specified as it is to see
whether the BSF_SYMBOLIC flag was set for the symbol.

Ian


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-01-29 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-01-29  8:32 -Bsymbolic is broken in ld H J Lu
1996-01-29 11:29 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).