5.7 Adjusting the Toolchain .?

Ken Moffat ken at linuxfromscratch.org
Thu Oct 6 07:24:19 PDT 2005


On Thu, 6 Oct 2005, Iman Darabi wrote:

> Hi
> Host System : lfs live cd version:x86-6.1-2.
> Book vresion: 6.1
> As you know  : after using the sed script to amend the GCC specs file
> to point to the new dynamic linker, the /tools/lib/ld-linux.so.2 will
> replace with the /lib/ld-linux.so.2  in specs file .
> ok , no problem ; but I'm using lfs live cd ,so i think i should
> edit the specs file every time after booting the live cd  ,am i true?
> should i do it until chapter 6?
>

  As I said to somebody else yesterday, I don't use the live CD.  But, 
/tools points to /mnt/lfs/tools, which is on the disk partition that 
will be mounted at '/' when you've completed the system, no ?

  So, anything in /tools will retain its contents (if you doubt this, use 
less or view to look at it).

> BTW:
> When ever we compile our programs with shared libs, some codes will
> be added to our code to call ld-linux.so , are those codes in specs
> file?,I mean does gcc add specs file to our new codes?

  As I understand it, the specs file controls what gets added to the 
programs to reference shared libraries (among the other things it 
controls, such as linking in the crt objects, how to invoke as, 
warnings for deprecated options).  In the same way that the book 
recommends you to use 'readelf -l' in the sanity checks, you can look 
for the 'Requesting program interpreter' in any dynamically-linked 
program.

Ken
-- 
  das eine Mal als Tragödie, das andere Mal als Farce


More information about the lfs-support mailing list