This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: _dl_profile_fixup & libc_p


On Thu, 2008-03-20 at 09:59 +0100, Gian Lorenzo Meocci wrote:

> Than I compi it:
> meox@ciop:~/parallel$ gcc -v -pg -static parallel.c -o parallel -lc_p
> -lpthread_p -lm_p -L/home/meox/myglibc/lib/

Why are you statically linking?

Your code example uses getpwuid() which is an 'nss' function and this is
NOT supported with static linking.

> There is no reference to ld.so, infact

Not surprising since you're statically linking.

> When I compiled with -lc all work, but with -lc_p I always get
> something like this:
> Program received signal SIGSEGV, Segmentation fault.
> 0x08095ca7 in _dl_fixup (l=0x80c95bc, reloc_offset=3218069876) at
> dl-runtime.c:70
> 70        const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
> (gdb) bt
> #0  0x08095ca7 in _dl_fixup (l=0x80c95bc, reloc_offset=3218069876) at
> dl-runtime.c:70

Like I said before, there's probably a mismatch between the loader and
libc_p.

If you're linking libc_p statically then it won't have a loader
specified and I wouldn't be surprised if it picked up the non-profile
system version of ld.so.

Don't static link and try linking against libc_p again.

Ryan S. Arnold


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