This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Weak (sdef) symbols displayed by nm for hppa1.1-hp-hpux10.20
- To: binutils at sourceware dot cygnus dot com
- Subject: Weak (sdef) symbols displayed by nm for hppa1.1-hp-hpux10.20
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Tue, 27 Jun 2000 12:32:45 -0400 (EDT)
The binutils version of nm always identifies weak symbols with 'W'.
For example, in the files xweak.o and xweak.o.orig, the scopes of the
symbol xyzzy are global and local, respectively. With this scheme,
it is also not possible to differ between text and data.
297 (hiauly1)dave> /usr/local/bin/nm xweak.o
U __main
U f
00000000 t gcc2_compiled.
00000000 T main
40000000 W xyzzy
298 (hiauly1)dave> /usr/local/bin/nm xweak.o.orig
U __main
U f
00000000 t gcc2_compiled.
00000000 T main
40000000 W xyzzy
This is what the HP nm displays. It appends 'S' for secondary (weak)
definitions.
299 (hiauly1)dave> nm -p xweak.o
0000000000 U __main
0000000000 U f
0000000000 t gcc2_compiled.
0000000003 T main
1073741824 DS xyzzy
301 (hiauly1)dave> nm -p xweak.o.orig
0000000000 U __main
0000000000 U f
0000000000 t gcc2_compiled.
0000000003 T main
1073741824 dS xyzzy
Now, to fix gcc so it emits global weak sysmbols.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)