public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Lynn Winebarger <owinebar@free-expression.org>
To: binutils@sourceware.cygnus.com
Subject: linking problem
Date: Thu, 07 Oct 1999 17:20:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.10.9910071923040.25961-100000@se232.math.indiana.edu> (raw)

   Hi.  I'm having a couple of problems I thought someone might know the
answer(s) to.  The first is that ld dies of a segmentation fault when I
run it as a user other than root (seems to work all right as root).  I'm
running Mandrake Linux 6.0.
   The other is slightly more complex.  I'm converting parts of the code
in objdump and the disassemblers (namely the i386 disassembler) to return
values for Petite Chez Scheme (a freely redistributable - but not free -
Scheme interpreter derived from Chez Scheme).  Anyway, I'm supposed to
link my code (that uses some simple scheme functions, like scheme value
constructors) to the Petite Chez Scheme executable to get a library, which
is then accessed by the interpreter. The problem is that the bfd/iberty
libraries require stuff from libc.  If I try to statically link them all
together (the converted disassembler/objdump functions, libbfd, libiberty,
the scheme executable, and libc) I get conflicts between the scheme
executable and libc (the order of linking seems to affect this - I know
there's a reason for this, but I can't recall it and the documentation of
ld doesn't say a lot about the effects of file order), such as the
definition of __init, and environ.  If I try linking the object files as
shared objects (with the other stuff - the scheme interpreter doesn't seem
to deal with resolving undefined references), then there are conflicts
between the scheme executable and the object files (I think) for sections
like the global offset table.
   Has anyone got any ideas on a way to resolve this, short of making my
own "libc" that provides what libbfd and libiberty need?

Lynn
 

             reply	other threads:[~1999-10-07 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-07 17:20 Lynn Winebarger [this message]
1999-10-07 18:50 ` Ian Lance Taylor

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=Pine.LNX.4.10.9910071923040.25961-100000@se232.math.indiana.edu \
    --to=owinebar@free-expression.org \
    --cc=binutils@sourceware.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).