LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-12-2006, 12:44 PM   #1
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 303

Rep: Reputation: 32
Should we trust on LD_PRELOAD (library preload) ?


i have been using preloading concept for some time, but what i found is quite surprising. e.g let's talk about open() system calll. If you are going to overload this then you should also overload __open() as it's called by fopen(). But even after doing all these overloading, i am just able to overload a subset of open() calls practally. When i tested this overloading business with cat it works fine whereas for vi it fails.
I don't know what's the problem ?
With thanks in advance,
 
Old 07-12-2006, 02:44 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 07-13-2006, 09:42 PM   #3
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
Quote:
Originally Posted by barunparichha
i have been using preloading concept for some time, but what i found is quite surprising. e.g let's talk about open() system calll. If you are going to overload this then you should also overload __open() as it's called by fopen(). But even after doing all these overloading, i am just able to overload a subset of open() calls practally. When i tested this overloading business with cat it works fine whereas for vi it fails.
I don't know what's the problem ?
With thanks in advance,
First check vi is dinamically linked with ldd(1), then try with ltrace(8)/strace(8) to see the syscalls involved. vi is usually linked statically as it's the basic editor but it depends on the OS.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Differences between LD_LIBRARY_PATH and LD_PRELOAD Nerox Linux - General 1 05-12-2012 07:51 PM
What dERROR: ld.so: object 'libavfs.so' from LD_PRELOAD cannot be preloaded: ignored. arubin Slackware 1 05-01-2006 09:27 AM
segmentation fault while defining LD_PRELOAD javeree Linux - Software 0 01-10-2005 03:48 PM
Differences between LD_LIBRARY_PATH and LD_PRELOAD Nerox Linux - Newbie 1 10-01-2004 08:03 AM
Library problem..ld.so.preload not found bruce1271 Linux - Software 1 09-25-2003 03:46 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration