X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Tim Van Holder Subject: Re: GCC 3.0.3 doesn't output the symbol type Date: Mon, 04 Mar 2002 12:23:09 +0100 Newsgroups: comp.os.msdos.djgpp Message-ID: References: User-Agent: Pan/0.11.2 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "Kernel Panic" Lines: 38 Organization: -= Skynet Usenet Service =- NNTP-Posting-Host: 194.78.64.238 X-Trace: 1015241225 reader0.news.skynet.be 247 194.78.64.238 X-Complaints-To: abuse AT skynet DOT be To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In a burst of inspiration, "Kernel Panic" 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)