delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/13/11:08:01

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Wed, 13 Jun 2001 17:07:56 +0200 (MET DST)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: djgpp workers list <djgpp-workers AT delorie DOT com>
Subject: Re: dxegen fails on object files built with gcc-3.0
In-Reply-To: <3B27A676.1211.FEF73C@localhost>
Message-ID: <Pine.LNX.4.10.10106131648120.2678-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 13 Jun 2001 pavenis AT lanet DOT lv wrote:

[...]
> -------  Output of 'objdump -x hello.o'  -----------
> 
> hello.o:     file format coff-go32
> hello.o

>   3 .stab         0000024c  00000030  00000030  00000134  2**2
>                   CONTENTS, RELOC, DEBUGGING
>   4 .stabstr      0000054f  0000027c  0000027c  00000380  2**0
>                   CONTENTS, DEBUGGING
>   5 .comment      00000028  000007cb  000007cb  000008cf  2**2
>                   CONTENTS, DEBUGGING

This is different from the 2.9.1 ELF example I showd: attributes of this
section are 'CONTENTS, READONLY', there, and the addresses (LMA, VMA) and
the alighment stored are zero:

  7 .comment      00000026  00000000  00000000  000015da  2**0
                  CONTENTS, READONLY

I guess this means that either there is indeed a bug in binutils, here, or
the difference is related to COFF vs. ELF file formats.

> ----------------  output of  'nm hello.o' ----------------
> 
> C:\temp>nm hello.o
> 00000030 b .bss
> 000007cb ? .comment
> 00000030 d .data
> 00000030 ? .stab
> 0000027c ? .stabstr
> 00000000 t .text
> 00000010 T _main
>          U _puts

Feels incorrect. If the Linux version is anything to judge by, 'nm' is
supposed to ignore all section-starting symbols (including .text and
.bss). So this might be a bug in symbol classification for COFF. OTOH,
'nm' output for DJGPP COFF files in binutils 2.9.1 includes them, too,
so this would seem to be a long-standing problem:

acaxp6-broeker ~> dos-nm hello.o | o
0000000000000010 t .bf
0000000000000024 b .bss
0000000000000024 d .data
0000000000000023 t .ef
0000000000000000 t .text
0000000000000000 t ___gnu_compiled_c
0000000000000010 T _main
                 U _puts
0000000000000000 t gcc2_compiled.

(This is using my own homegrown build of cross-gcc 2.8.1 and
cross-binutils 2.9.1 from DEC Alpha Unix to DJGPP).

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.


- Raw text -


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