Ryan S. Arnold
Sat Aug 17 13:49:00 GMT 2013
On Sat, Aug 17, 2013 at 2:23 AM, vijay nag <email@example.com> wrote:
> On Saturday, August 17, 2013, Jagadish_gmail <firstname.lastname@example.org> wrote:
>> I have installed glibc using the following command ..
>> I have added my new function pthread_barrier_wait_jag()
>> bash$../glibc-2.15/configure --prefix=/home/jbk5155/glibc/glibc-build/ --enable-addon=pthread
>> <configure successful>
>> bash$sudo make
>> <make was successful>
>> bash$sudo make install
>> <make install was successful>
>> I see my function being listed with nm command listed below ..
>> nm libpthread.so.0 | grep "jag"
>> but when I try to compile my testcase with -L/home/jbk5155/glibc/glibc-build/ -lpthread ... testcase compiled successfully but when I do a ldd I still see the default libpthread.so.0 is being picked up
>> jbk5155@jbk5155:~/splash/codes/kernels/fft$ ldd FFT
>> linux-gate.so.1 => (0xb7741000)
>> libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7712000)
>> libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb76e6000)
>> libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb753b000)
>> /lib/ld-linux.so.2 (0xb7742000)
>> and hence when I run it my testcase crashes saying pthread_barrier_wait_jag() is not found. Can you please let me know what I am doing wrong?
>> Thanks and Regards,
>> -------- Original Message --------
>> Subject: pthread_barrier_wait help
>> Date: Wed, 14 Aug 2013 13:49:18 -0700
>> From: Jagadish_gmail <email@example.com>
>> To: firstname.lastname@example.org
>> I am a graduate student and I am looking for some help with glibc. I
>> am working on a project where I am trying to modify
>> pthread_barrier_wait.c() code. I see that the hand-optimized
>> pthread_barrier_wait.S (assembler version) is currently being used as I
>> am on X86 architecture.
>> I want my build scripts to use the generic pthread_barrier_wait.c
>> instead of the hand-optimized pthread_barrier_wait.S.
>> Can you please let me know what changes do I need to make to use this c
>> version of the code instead of the hand-optimized assembler version ?
>> Thanks and Regards,
> Try removing absolute path in the linker script libpthread.so. Ld is
> most probably picking library from host machine rather than from your
> custom libc ?
Vijay is right. The correct way to test this is to use the dynamic
linker from your new build to invoke your application, for example:
paths to the temp glibc build> ./application
More information about the Libc-help