[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
HP-UX 11.00 and parsing /bin/nm -p output (failing)
From: |
libtool |
Subject: |
HP-UX 11.00 and parsing /bin/nm -p output (failing) |
Date: |
Mon, 23 Apr 2001 14:11:52 -0500 |
User-agent: |
Mutt/1.1.12i |
This pertains to the HEAD branch.
When parsing the output of /bin/nm -p, libtool.m4 contains the
following sed statement to massage the output:
# Try without a prefix undercore, then with it.
for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
[lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[
][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"]
So, there can be only *one* $symcode between spaces in the /bin/nm -p
output. While creating demo/libtool during a run of 'make tests' for
demo-conf.test, /bin/nm -p generates the following on the sample
conftest.o file:
$ /bin/nm -p conftest.o
0000000008 t D$0
0000000060 t D$1
0000000008 T main
0000000000 T nm_test_func
0000000001 CS nm_test_var
Under HP-UX 10.20, it gives:
$ /bin/nm -p conftest.o
0000000008 t D$0
0000000056 t D$1
0000000011 T main
0000000003 T nm_test_func
0000000001 C nm_test_var
According to the man page for nm(1):
-p Display information in a blank-separated output
format. Each symbol name is preceded by its value
(blanks if undefined) and one of the letters A
(absolute), B (bss symbol), C (common symbol), D
(data symbol), R (section region), S (tstorage
symbol), T (text symbol) or U (undefined). S is
used on SOM files only. If the symbol is local
(nonexternal), the type letter is in lowercase.
If the symbol is a secondary definition, the type
letter is followed by the letter S. Note that -p
is not compatible with -P.
So, it seems there can be *more* than one $symcode. So, how about we
change the sed statement to look for *more* than one $symcode
separated by spaces? I have looked at the man pages of nm on Solaris
and Tru64 UNIX and don't see anywhere that there is only one $symcode
output.
--
albert chin (address@hidden)
- HP-UX 11.00 and parsing /bin/nm -p output (failing),
libtool <=