Page 1 of 1

linking errors

Posted: Mon Apr 09, 2007 7:49 am
by bsunisol
hi,
i am linking my osloader with ld but the loader makes a wrong call.
how could i order ld to give me the adresses of the funktions in the .obj files to compare them with the resulting binary-file?

using objdump

Posted: Fri Apr 13, 2007 6:14 pm
by Kevin McGuire
Since you did not say what operating system you were using I will give you the linux example. You also said object files so passing the map file option to the linker would not do exactly what you want. So:

man objdump
man ld
man gcc

hint: option -x

Posted: Sat Apr 14, 2007 7:52 am
by bsunisol
i allready found an option to get a mapfile from ld.
it says the function is at DES:0x00000850.

but when i code call 0x850 instead of the label
the result is as bad as before.....

Posted: Sat Apr 14, 2007 8:33 am
by Combuster
You should check wether you are using an absolute call or not. (you are probably not) run bochs' debugger to see wether the call points to the location you expect it to be.