[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HP-UX 11.00 and parsing /bin/nm -p output (failing)
From: |
Gary V . Vaughan |
Subject: |
Re: HP-UX 11.00 and parsing /bin/nm -p output (failing) |
Date: |
Thu, 28 Jun 2001 23:59:46 +0100 |
On Monday 25 June 2001 12:50 am, Gary V. Vaughan wrote:
> On Thursday 03 May 2001 7:11 pm, address@hidden wrote:
> > On Mon, Apr 23, 2001 at 03:28:52PM -0500,
>
> address@hidden wrote:
> > > On Mon, Apr 23, 2001 at 02:11:52PM -0500, address@hidden
>
> wrote:
> > > > 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
> > > >
> > > > [snip ...]
> > > >
> > > > 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.
> > >
> > > Patch below.
> >
> > Ok, one more problem. Check out the following from ltmain.in (line
> > ~3300):
> >
> > sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
> > -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
> > < "$nlist" >> "$output_objdir/$dlsyms"
> >
> > It still assumes one $symcode. The side-effect of this is that self
> > dlopen fails (well, variables cannot be found). Making the change here
> > is more difficult because we don't have access to $symcode anymore. In
> > my patch, I used $symcode to be more precise in the sed statement than
> > simply adding 's/^.. ' to the already-existing 's/^. '. However, what
> > do we do here? Do we add the ugly hack of:
> >
> > sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
> > -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
> > -e 's/^.. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
> > < "$nlist" >> "$output_objdir/$dlsyms"
> >
> > I have tested this and it works.
>
> Why not pass the expression to ltmain as a config variable? I propose the
> attached patch. Okay to commit?
I'm invoking the 72 hour rule to commit this patch.
Albert, if this doesn't fix the problem you were having, let me know...
Cheers,
Gary.
--
())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org)
( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____
/ )= GNU Hacker http://www.gnu.org/software/libtool \' `&
`(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/