LD Relocation Problem

Kiran Chandrashekaran, Nair (IE10) Kiran.Nair@honeywell.com
Mon Oct 20 04:59:00 GMT 2003


Hi all,

I am facing the following problem, trying to build a relocatable out put 
linking multiple files, with ld 2.13 for mingw32
This is the ld command that I use.

ld -d -r -nostdlib <more than 5 object files> -o test.exe

I infer that there is the problem with the output due to the following
reasons,

1. When the dump test.exe using "objdump -S test.exe",I get a jumbled output

  ( some functions finish mid way,and other start...)
  Also some of the functions, do not have the source code listings.
  Mostly the output is fine for the first file thats given to the linker.
2. When I use "gdb test.exe"
   While trying to print the symbols, for some symbols, I get a message
that there is no debugging info available.
   And for some ,they point to other symbol.
   Is the debugging info screwed up?

I don't face any of these problems, when the a try to link a single object
file.
I get a similar behavior for i386-elf build of ld.

thanks
Kiran




More information about the Binutils mailing list