Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-16-2011, 02:52 AM   #1
LQ Newbie
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
How to use a newly compiled dynamic linker

Hello friends,

I want to install a newly compiled linker as the default linker on my VM running Ubuntu.

I compiled and installed a new custom kernel on my VM (linux-2.6.36) and also compiled (not install) a custom gnu c library (glibc-2.11.2) on the newly installed custom kernel. I am able to run a simple helloworld.c program to verify that my program worked successfully using the newly build dynamic linker in the /elf directory.

I am stuck here... I want to replace the real linker inside /lib with the new linker that I compiled. I tried to make the soft link named that originally points to the real linker file, point to my newly compiled linker, but my VM crashed. I also tried moving the compiled linker and wrote it over the original linker, and the VM crashed.

None of the commands worked after that as they could not access any of the shared libraries and I received this error '/bin/bash: No such file or directory'.

I also tried to change the LD_LIBRARY_PATH to point to my linker and did not have any luck there either.

Could someone tell me what I should do or point me in the right direction. I would really appreciate your help.

Thanks in advance,
Old 02-17-2011, 11:18 AM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,321

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
Welcome to LQ.

Glibc is your system, and none of its components can usually be changed.

All installed libraries, all (most) commands, most applications :
They are compiled with the original glibc, and depend on, etc.
Please try the command : 'ldd /bin/bash' to see the dependencies.

If you want to understand in depth, how an OS works, suggest :
Build "Linux From Scratch", LFS
The LQ LFS Forum:

Old 02-17-2011, 02:06 PM   #3
LQ Newbie
Registered: Feb 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you for replying.

I am not trying to change the original glibc that is installed. I am trying to run a program using the newly compiled glibc and cross compile by making the dynamic linker point to the newly compiled shared libraries in glibc-2.11.2.

I did 'ldd /bin/bash' as you said and this is what I got => (0x00007ffff1bff000) => /lib/ (0x00007f69d1f3e000) => /lib/ (0x00007f69d1d3a000) => /lib/ (0x00007f69d19b6000)
/lib64/ (0x00007f69d2188000)

I can see that it is dependent on which points to . Is there a way to make that soft link point to the new linker which I compiled, which would then link everything with the new shared libraries?



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
Stuck on dynamic linker jmc1987 Linux From Scratch 1 10-11-2009 01:06 AM
how to choose dynamic linker for a.out file? surfer41 Programming 4 07-03-2008 03:32 PM
Linker is linking to the latest compiled changes manikan Programming 2 03-02-2006 11:41 AM
Linux dynamic linker thedevilsjester Programming 4 09-20-2005 08:11 PM
can't load dynamic linker '/lib/ qanopus Linux - General 4 01-06-2003 07:19 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration