I use gcc and nasm to generate 'elf' format file,and when I use ld -o
a.o b.o,it can success,but if I type './a.out' in the console,it says
'segment fault'.
So I disasm it ,and find that the 'call' address is wrong!For example
,it should 'call 0xd',but it actually 'call 0xe'.
I need to use nasm and gcc to generate relocatable object file,but I
can't use ld -r -o the generate correct binary file.Who can help me?
Thanks very much.
BTW:If I use 'gcc a.o b.o',it can work fine.But the 'gcc' can not
generate the relocatable file .