Mail Archives: djgpp/1999/01/22/22:43:39
Paul Sneddon wrote:
>
> I have compiled my utils to support ELF and carry out the linking example
> (elftest) that comes with NASM. When I try to link the two files together I
> get lots of undefined reference errors. These references are located in the
> elf file build with NASM and linked to the elf file created with gcc. I am
> following the NASM example correctly - can anyone help.
I have just a guess (because I haven't added any ELF support
to DJGPP and so can't test any of this).
If you use a version of GCC in which the ELF format is native,
GCC doesn't add the leading "_" to global symbols. Since the
elftest example in NASM was written for such versions of GCC,
it doesn't either.
If you modify DJGPP to support ELF, I *think* it still will
prepend the underscore. (Somebody, correct me if I am wrong
about this part).
If you add underscores to the GLOBAL and EXTERN symbols
in the ASM file, that may fix the problem. Alternately,
I think there are tools for adding or removing them in
the object code.
BTW, I looked at another post about adding ELF support to the
binutils in DJGPP. The sequence of steps looked much too
hard. I have wanted ELF support in the past and probably
will in the future. It would be nice if someone who has
done it would package up the binaries and a brief description
of what is affected and how you use them, and make that
available.
--
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/
- Raw text -