delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/03/04/06:30:17

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: Tim Van Holder <notme AT spamproofemail DOT com>
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: <pan.2002.03.04.12.23.08.942893.6247@spamproofemail.com>
References: <jhOe8.74$ax1 DOT 577 AT castor DOT casema DOT net>
User-Agent: Pan/0.11.2 (Unix)
Mime-Version: 1.0
X-Comment-To: "Kernel Panic" <rzhevskiy AT hetnet DOT nl>
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" <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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019