gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] LD_COMMAND for Linux


From: Jerry James
Subject: [Gcl-devel] LD_COMMAND for Linux
Date: Tue, 11 Nov 2008 15:25:55 -0700

I'm struggling to understand the definition of LD_COMMAND in
h/linux.h.  Currently, it generates a string as follows:

  ld -d -S -N -x -A %s -T %x %s %s -o %s

but Linux uses GNU ld, where:

  -A sets the architecture
  -T sets the linker script file

Neither of those make any sense in this definition.  I suspect these
are the BSD linker options, where:

  -A identifies a symbol file
  -T specifies the start of the text segment

The equivalents in GNU ld are -R and -e, respectively.  Also, GNU ld
expects a base 10 number as the argument to -e, but BSD's -T expects a
hex number; note the %x in the LD_COMMAND definition.  So I don't see
how this works at all on a Linux system.  Shouldn't the definition be:

  ld -d -S -N -x -R %s -e %d %s %s -o %s

?  Is the code that invokes LD_COMMAND never executed on a Linux box?
-- 
Jerry James
http://loganjerry.googlepages.com/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]