Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-15-2013, 02:00 PM   #1
Registered: Aug 2009
Posts: 167

Rep: Reputation: 0
using LD_PRELOAD and changing LD_LIBRARY_PATH

I am not sure where to place this thread. I am new to this forum. I have a question about
an IBM example in one of their technical reports.

In that example they are demonstrating how to override a function in a gnu library. The code is

It's me the shim. Hi there!

I know about preoload files, but I thought that you had to put not only the file name, but its path into the PRE_LOAD command.

Also. what is gong on on the next line? It seems to be nonsense. I know it is not.


What is with the .: in the command. It is needed because the output of ./setresgid-tester is different if it is left out.

Is it a good idea to change the LD_LIBRARY_PATH by adding an additional path?

Any help appreciated. Thanks in advance.


Old 10-16-2013, 07:24 AM   #2
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 281Reputation: 281Reputation: 281
The . is the current directory, by adding it in they have enabled the ability to PRELOAD the library from the current directory which is why they have not given it's path.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:51 PM
ERROR: LD_PRELOAD cannot be preloaded xombboxer Linux - Newbie 2 05-12-2011 12:16 PM
LD_PRELOAD not working kamransoomro84 Programming 3 07-28-2010 07:09 PM
Should we trust on LD_PRELOAD (library preload) ? barunparichha Programming 2 07-13-2006 10:42 PM
Differences between LD_LIBRARY_PATH and LD_PRELOAD Nerox Linux - Newbie 1 10-01-2004 09:03 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:38 PM.

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