Sponsored Content
Operating Systems Linux LD_PRELOAD on x86_64 gives error from ld.so Post 302177685 by Manish Mukherje on Saturday 22nd of March 2008 04:48:32 PM
Old 03-22-2008
LD_PRELOAD on x86_64 gives error from ld.so

I have implemented an interposer for open() and open64() system call.

This interposer is implemented in interposer.c and I have compiled it in a shared library (libinterposer.so) using the following commands:

gcc -g -fPIC -s -o interposer.o -c interposer.c
gcc -s -g -shared -nostartfiles -o libinterposer.so interposer.o -ldl

This interposer is working on i686 architecture. When I say working, it means, I can set the LD_PRELOAD environment variable to 'libinterposer.so' and intercept all 'open' system calls.

However when I repeat the exact same steps on a x86_64, I get errors from ld.so like so:

manmukhe@sjc-lds-133:[lbt]echo $LD_PRELOAD
libinterposer.x86_64.so

manmukhe@sjc-lds-133:[lbt]touch x.c
ERROR: ld.so: object 'libinterposer.x86_64.so' from LD_PRELOAD cannot be preloaded: ignored.

The file types for libinterposer.so and touch are as follows:

manmukhe@sjc-lds-133:[lbt]file libinterposer.x86_64.so
libinterposer.x86_64.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), stripped

manmukhe@sjc-lds-133:[lbt]file /bin/touch
/bin/touch: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped


Here are my questions:
1. What am I doing wrong? Why am I getting the ld.so error?
2. Is there any way to suppress the ld.so errors?
 

8 More Discussions You Might Find Interesting

1. Linux

confused X86_64 and AIX

hello everybody i want to install some package on AIX 5.3 the name of rpm is something like libaio-0.3.106-4.2.x86_64.rpm is it a good rpm for AIX 5.3 my question is is AIX and x86_64 mean the same thing ! thanks (2 Replies)
Discussion started by: eternalflame
2 Replies

2. HP-UX

LD_PRELOAD on HP UX?

Hi , Is LD_PRELOAD supported on HP UX? I am having issues when i export the below export LD_PRELOAD=/usr/local/vertex/commtax_1.0.16/64bit/lib/libctq.so ldd /usr/local/vertex/commtax_1.0.16/64bit/lib/libctq.so /usr/lib/hpux64/dld.so: Unable to find library 'libodbc.so'. Killed Can... (2 Replies)
Discussion started by: psreddy1234
2 Replies

3. UNIX for Advanced & Expert Users

What does LD_PRELOAD signify?

Hi, What does LD_PRELOAD variable signify on HP-UX? thanks in advance, -Ashish (4 Replies)
Discussion started by: shriashishpatil
4 Replies

4. UNIX for Advanced & Expert Users

Preloading libraries.. LD_PRELOAD

well i know what LD_PRELOAD is. Now suppose i have hooked a function XDrawString in the my library (Mylib.so.1) and then used the command export LD_PRELOAD=/path/mylib.so.1 Now suppose i open Xeditor by typing 'xeditor' in the console, my library is geting used, so i knw that this applilcation is... (3 Replies)
Discussion started by: manchester
3 Replies

5. Shell Programming and Scripting

Installing Perl/Tk in x86_64

Hi, experts, I am trying to intall Perl/Tk module (Tk-804.028 ) into Perl5.6.1, however, the directory structure seems to be different from i386 than x86_64 and the installation keeps failing. Is this a known/common issue? Or does anyone has any workaround for this? ~* Dniz *~ (0 Replies)
Discussion started by: dniz
0 Replies

6. UNIX for Advanced & Expert Users

Declaring LD_PRELOAD system wide for dynamic loading

Dear Fellows; As being new to linux, i have tried to synamically load a custom library which overrides some system calls like conncet(), socket() etc.... for custom purposes. It works well, if declaring the environment path LD_PRELOAD and execution of the application to be override... (0 Replies)
Discussion started by: mzeeshan
0 Replies

7. Solaris

Is there a Solaris 10 x86_64

I have always seen a Solaris 10 32 bit version..Is there an x86_64?? (2 Replies)
Discussion started by: kirtikjr
2 Replies

8. Programming

LD_PRELOAD getting ignored .. can anyone tell me why ?

I had it working but i screwed up something and now i get me@mymachine:~$ LD_PRELOAD=/home/me/libf1.o ldd FCaller ERROR: ld.so: object '/home/me/libf1.o' from LD_PRELOAD cannot be preloaded: ignored. ERROR: ld.so: object '/home/me/libf1.o' from LD_PRELOAD cannot be preloaded: ignored. ERROR:... (3 Replies)
Discussion started by: NetworkLearning
3 Replies
LBT(1)							      General Commands Manual							    LBT(1)

NAME
lbt - LTL to Buchi Translator SYNOPSIS
lbt < formula.txt > automaton.txt lbt2dot < automaton.txt > automaton.dot DESCRIPTION
This manual page documents briefly the lbt and lbt2dot commands. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. Instead, it has documentation in HTML format; see below. lbt is a filter that translates a linear temporal logic (LTL) formula to a corresponding generalized Buchi automaton. The translation is based on the algorithm by Gerth, Peled and Vardi presented at PSTV'95, Simple on-the-fly automatic verification of linear temporal logic. Hardly any optimizations are implemented, and the generated automaton is often bigger than necessary. But on the other hand, it should always be correct. The filter lbt2dot can be used to translate Buchi automata from the lbt output format to GraphViz format for visualization. EXAMPLE
echo G p0 | lbt | lbt2dot | dotty - SEE ALSO
dotty(1). FILES
/usr/share/doc/lbt/html/index.html The real documentation for LBT. AUTHOR
This manual page was written by Marko Makela <msmakela@tcs.hut.fi>, for the Debian GNU/Linux system (but may be used by others). The lbt program was written by Mauno Ronkko and Heikki Tauriainen, and it was optimized by Marko Makela, who also wrote the lbt2dot filter. Please see the copyright file in /usr/share/doc/lbt for details. August 10, 2001 LBT(1)
All times are GMT -4. The time now is 05:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy