This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Weak (sdef) symbols displayed by nm for hppa1.1-hp-hpux10.20


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]