public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: hjl@nynexst.com (H.J. Lu)
To: eric@aib.com (Eric Youngdale)
Cc: raeburn@cygnus.com (Ken Raeburn),
	ian@cygnus.com (Ian Lance Taylor),
	gas2@cygnus.com
Subject: GNU ld, ELF and C++
Date: Wed, 12 Oct 1994 22:18:00 -0000	[thread overview]
Message-ID: <9410130518.AA16303@titanic.nynexst.com> (raw)
In-Reply-To: <m0qv4iH-00028rC@dgisv.aib.com>

> 
> 
> >BTW, Ian, how compatible is the GNU ELF ld with SVR4/x86 ld? Can it
> >be a dropin replacement? Has anyone tried to use the GNU ELF ld to
> >build a shared ELF library under SVR4/x86?
> 
> 	Yes, I used to do this all the time at my old job.  I intended it

Have you tried

gcc -shared -o libfoo.so *.o

with the GNU ld under SVR4/x86? First, GNU ld doesn't take the flags
for SVR4/x86 ld. Do you use a special specs for GNU ld under SVR4/x86?

I had to edit specs a little bit. I changed "%{shared:-G -dy}" to
"%{shared:-shared}".

My test case is little bit tricky since I am working on the ELF support
for the C++ shared library. My stuff works with the GNU as and SVR4/x86
ld, but not the GNU ld. If I create the shared C++ ELF library under
SVR4/x86 with the GNU as and SVR4 ld, the global ctors and dtors in
the shared C++ ELF library are called in the right order. But the
shared C++ ELF library created with the GNU as and GNU ld won't
call those global ctors and dtors at all. It looks that there are
bugs with creating the shared ELF library in the GNU ld. If anyone
is interested, I can send my test case.

> to be a drop in replacement, but the handling of the SHT_DYNSYM sections
> in our version of SVr4 was a bit weird, and Solaris treated things more
> logically.  That being said, a little work might be needed on some flavors of
> SVr4 to support a unified symbol table which the Dell SVr4 seemed to want.
> This could be a linker option, I think.
> 
> 

Eric, there is a bug in the Linux d-linker. It has something to
do with mixing the shared/static libraries. I will send you a
test case later this week.

-- 
H.J. Lu
NYNEX Science and Technology, Inc.			hjl@nynexst.com


      reply	other threads:[~1994-10-12 22:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m0quqzC-00034LC@neal.ctd.comsat.com>
1994-10-11 23:11 ` Bad crt files H.J. Lu
1994-10-12  7:34   ` Eric Youngdale
1994-10-12 22:18     ` H.J. Lu [this message]

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=9410130518.AA16303@titanic.nynexst.com \
    --to=hjl@nynexst.com \
    --cc=eric@aib.com \
    --cc=gas2@cygnus.com \
    --cc=ian@cygnus.com \
    --cc=raeburn@cygnus.com \
    /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).