From: hjl@nynexst.com (H.J. Lu)
To: pk@cs.few.eur.nl (Paul Kranenburg)
Cc: gas2@cygnus.com
Subject: Re: ld, ld.so and -symbolic
Date: Sun, 18 Jun 1995 08:14:00 -0000 [thread overview]
Message-ID: <9506181506.AA25882@titanic.nynexst.com> (raw)
In-Reply-To: <9506181040.AA00218@cs.few.eur.nl>
>
> > > The question has to do with the -symbolic option that gcc man pages say is
> > > a linker option, but ld does not seem to support. My understanding on sun
> > > solaris is that the -Bsymbolic option allows me to have two, or more, shared
> > > objects that can have there own global variables, that won't conflict with
> > > other variables of the same name. The question I have is, is this supported,
> > > can it be supported, when, how, how much?
>
> You'd have to make sure that 1) all symbols get resolved, i.e. no
> references to undefined remain in the shared object, and 2) all
> remaining relocation records are of the type "relative to load address".
> The latter is a hard requirement if you have to bootstrap a la "ld.so".
>
> You'll need to have a library handy from which you can pull in all
> required PIC modules, e.g. say "libc_pic.a" (in stead of "libc.so.x.y").
>
Are we talking about the same thing? BTW, you don't have to use
-Bsymbolic when you build ld.so.
--
H.J. Lu
NYNEX Science and Technology, Inc. hjl@nynexst.com
-----
-B symbolic In dynamic mode only, when building a shared
object, bind references to global symbols to
their definitions within the object, if defini-
tions are available. Normally, references to
global symbols within shared objects are not
bound until runtime, even if definitions are
available, so that definitions of the same sym-
bol in an executable or other shared objects can
override the object's own definition. ld will
issue warnings for undefined symbols unless -z
defs overrides.
next prev parent reply other threads:[~1995-06-18 8:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199506170044.RAA29582@www.willows.com>
1995-06-17 13:09 ` H.J. Lu
1995-06-18 3:40 ` Paul Kranenburg
1995-06-18 8:14 ` H.J. Lu [this message]
1995-06-18 10:16 ` Roland McGrath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9506181506.AA25882@titanic.nynexst.com \
--to=hjl@nynexst.com \
--cc=gas2@cygnus.com \
--cc=pk@cs.few.eur.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).