delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/13/05:02:13

Message-Id: <200106130901.f5D91vW03864@hal.astr.lu.lv>
From: Andris Pavenis <pavenis AT latnet DOT lv>
To: djgpp-workers AT delorie DOT com
Subject: dxegen fails on object files built with gcc-3.0
Date: Wed, 13 Jun 2001 12:01:57 +0300
X-Mailer: KMail [version 1.2.2]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

dxegen fails on object files built by gcc-3.0:

After invoking ld, dxegen reads simbols and misinterprets some items
as being unresolved external references

andris AT hal:/disk2/cvs/djgpp/build/djgpp/src/libemu/src$ i586-pc-msdosdjgpp-nm --demangle emu387.o  
000084a0 b .bss
000085f0 ? .comment
00008140 d .data
00000000 t .text
000081c4 d CONST_1
000081dc d CONST_L2E
000081d0 d CONST_L2T
.....

andris AT hal:/disk2/cvs/djgpp/build/djgpp/src/libemu/src$ i586-pc-msdosdjgpp-nm --version
GNU nm 2.11
Copyright 1997, 98, 99, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.

(under Win98 I have installed 6 June version of binutils (2.11.90) and the problem doesn't go away). 

Currently I'm patching dxegen.c to skip symbols ".comment".  Anyway I suspect it's some problem with binutils.

Andris

Index: dxegen.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/dxe/dxegen.c,v
retrieving revision 1.5
diff -p -3 -r1.5 dxegen.c
*** dxegen.c	2001/06/09 21:37:10	1.5
--- dxegen.c	2001/06/13 09:01:10
*************** int main(int argc, char **argv)
*** 186,192 ****
  	   name
  	   );
  #endif
!     if (sym[i].e_scnum == 0)
      {
        printf("Error: object contains unresolved external symbols (%s)\n", name);
        errors ++;
--- 186,195 ----
  	   name
  	   );
  #endif
!     /* gcc-3.0 generates .comment with e_scnum==0. I don't know whether it's
!        correct to skip it though . It may be also temporary problem with
!        current CVS version of gcc-3.0 ...   (AP)  */
!     if (sym[i].e_scnum == 0 && strncmp(sym[i].e.e_name,".comment",8)!=0)
      {
        printf("Error: object contains unresolved external symbols (%s)\n", name);
        errors ++;


- Raw text -


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