From: "Mark E." <snowball3@usa.net>
To: gas2@cygnus.com
Subject: Bug in binutils 2.10 snap not in binutils 2.9.1
Date: Thu, 08 Oct 1998 13:06:00 -0000 [thread overview]
Message-ID: <199810082006.UAA104136@out1.ibm.net> (raw)
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/
reply other threads:[~1998-10-08 13:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199810082006.UAA104136@out1.ibm.net \
--to=snowball3@usa.net \
--cc=gas2@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).