public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* Bug in binutils 2.10 snap not in binutils 2.9.1
@ 1998-10-08 13:06 Mark E.
  0 siblings, 0 replies; only message in thread
From: Mark E. @ 1998-10-08 13:06 UTC (permalink / raw)
  To: gas2

Hi guys,
While working on getting weak symbol support to work, I ran into an 
unrelated problem. I should mention it's unrelated because it also 
happens from my unpatched Oct 1 snapshot.

When compiling this sample program:
#include <stdio.h>

int main()
{
  printf("Test to see if this compiles\n");
  return 0;
}

I get this listing from objdump with binutils 2.9.1:

main.o:     file format coff-go32

SYMBOL TABLE:
[  0](sec -2)(fl 0x00)(ty   0)(scl 103) (nx 1) 0x00000000 main.c
File 
[  2](sec  1)(fl 0x00)(ty   0)(scl   6) (nx 0) 0x00000000 gcc2_compiled.
[  3](sec  1)(fl 0x00)(ty   0)(scl   6) (nx 0) 0x00000000 
___gnu_compiled_c
[  4](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000000 .text
AUX scnlen 0x38 nreloc 2 nlnno 0
[  6](sec  2)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000038 .data
AUX scnlen 0x0 nreloc 0 nlnno 0
[  8](sec  3)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000038 .bss
AUX scnlen 0x0 nreloc 0 nlnno 0
[ 10](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000020 _main
[ 11](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 _printf


Note the number just to the left of .data and .bss.

Now here's the objdump from the Oct 1 binutils 2.10 snapshot:


main1.o:     file format coff-go32

SYMBOL TABLE:
[  0](sec -2)(fl 0x00)(ty   0)(scl 103) (nx 1) 0x00000000 main1.c
File 
[  2](sec  1)(fl 0x00)(ty   0)(scl   6) (nx 0) 0x00000000 gcc2_compiled.
[  3](sec  1)(fl 0x00)(ty   0)(scl   6) (nx 0) 0x00000000 
___gnu_compiled_c
[  4](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000000 .text
AUX scnlen 0x38 nreloc 2 nlnno 0
[  6](sec  2)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000000 .data
AUX scnlen 0x0 nreloc 0 nlnno 0
[  8](sec  3)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000000 .bss
AUX scnlen 0x0 nreloc 0 nlnno 0
[ 10](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000020 _main
[ 11](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 _printf


Note that .data and .bss are zero.

When main.c is compiled and linked with 2.9.1, it prints the message. 
When main.c is compiled and linked with the 2.10 snapshot, 
sometimes nothing happens, other times the program crashes. Like I 
said, I'm sure it isn't the changes I made I used the Oct 1 snapshot as 
it without any of my patches.

Mark

-- 
Mark E. snowball3@usa.net
http://members.xoom.com/snowball3/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-10-08 13:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-08 13:06 Bug in binutils 2.10 snap not in binutils 2.9.1 Mark E.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).