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]

linking problem



   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
 


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