Weak (sdef) symbols displayed by nm for hppa1.1-hp-hpux10.20
John David Anglin
dave@hiauly1.hia.nrc.ca
Tue Jun 27 09:32:00 GMT 2000
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)
More information about the Binutils
mailing list