This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
More SOM fun
- To: gcc-patches at gcc dot gnu dot org
- Subject: More SOM fun
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 20 Apr 2001 11:16:17 -0700
HP's NM prints subspace names for each symbol it finds. This can cause
us to get false positive matches for static ctors/dtors during the collect2
phase. This patch changes the arguments we provide to NM so that it no
longer prints the subspace names.
I've installed this on the branch and in the mainline sources.
The test results when using HP's nm and GNU nm should now be identical.
* config/pa/som.h (NM_FLAGS): Define.
Index: config/pa/som.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/pa/som.h,v
retrieving revision 1.13.4.4
diff -c -3 -p -r1.13.4.4 som.h
*** som.h 2001/04/20 01:11:43 1.13.4.4
--- som.h 2001/04/20 18:19:04
*************** Boston, MA 02111-1307, USA. */
*** 51,56 ****
--- 51,61 ----
fprintf (FILE, \
"\t.stabs \"\",%d,0,0,L$text_end0000\nL$text_end0000:\n", N_SO)
+ /* The HP supplied NM will print out the subspace names for each symbol it
+ finds, which can cause false matches when looking for ctors/dtors. The
+ "-p" argument changes the output to not include subspace names. */
+ #define NM_FLAGS "-p -n"
+
/* HPUX has a program 'chatr' to list the dependencies of dynamically
linked executables and shared libraries. */
#define LDD_SUFFIX "chatr"