Mail Archives: djgpp/2002/03/04/06:30:17
In a burst of inspiration, "Kernel Panic" <rzhevskiy AT hetnet DOT nl> wrote this
on Tue, 26 Feb 2002 16:59:11 +0100:
> I'm using the DJGPP port of GCC 3.0.3 and binutils 2.11.2 (rebuilt to
> support ELF; coff-go32 is the primary target). GCC doesn't seem to
> output the symbol types in the assembler output it generates (I would
> like to have those ".type name, @function" in the output file for every
> function). Because of this, I'm unable to link against shared libraries.
>
> Anyone knows what could be wrong? Should I also rebuild GCC or is there
> any other option?
So you have a single GCC, but a binutils that can handle both coff-go32
and ELF? That's not enough - gcc is target-specific.
So you'll indeed have to build a djgpp-to-linux cross-compiler (at least,
I assume you're targeting linux). Plus, you'll probably want to build
an ELF-specific binutils, for use by that cross-compiler, as well; the
multi-format build is mainly useful for input (i.e. so 'nm' will
recognize both formats). Setting up gcc so it passes the necessary flags
to gas/ld/... to produce the 'other' format is non-trivial, IIRC from
my experiments in setting up a djgpp-to-mingw32 cross-compiler.
In the end you should end up with a typical cross-compiler setup
(assuming a DJGPP host and Linux target):
$DJDIR/bin:
gcc.exe (DJGPP gcc)
nm.exe (multi-format binutils, default coff-go32)
i386-pc-linux-gnu-gcc.exe (DJGPP-to-linux gcc)
i386-pc-linux-gnu-nm.exe (ELF binutils)
$DJDIR/i386-pc-linux-gnu:
include/ (Linux system headers go here)
lib/ (Linux system libs go here)
bin/
gcc.exe (DJGPP-to-linux gcc)
nm.exe (ELF binutils)
(obviously, there will be more files than that)
- Raw text -