[LFS Trac] #2081: Chapter 5 Glibc looks at /etc/ld.so.preload

LFS Trac trac at linuxfromscratch.org
Thu Sep 20 07:52:14 PDT 2007

#2081: Chapter 5 Glibc looks at /etc/ld.so.preload
 Reporter:  alexander at linuxfromscratch.org  |       Owner:  lfs-book at linuxfromscratch.org
     Type:  defect                          |      Status:  new                          
 Priority:  normal                          |   Milestone:  7.0                          
Component:  Book                            |     Version:  6.3                          
 Severity:  normal                          |    Keywords:                               
 The problem is that Chapter5 glibc looks into the /etc/ld.so.preload file
 instead of, e.g.,  /tools/etc/ld.so.preload.

 Suppose that /etc/ld.so.preload contains one line: /usr/lib/libaoss.so.0
 (I am sick and tired of OSS-only applications that by definition cannot
 respect the software-only ALSA PCM volume control on my Intel HD audio
 chip, and too lazy to change the .desktop files each time I upgrade these
 applications). Then, programs compiled against Chapter 5 glibc will not be
 able to run - the dynamic linker will attempt to load
 /usr/lib/libaoss.so.0 and notice that it depends upon libasound.so.2 which
 is not available in the default library search path.

 Yes, I know that listing /usr/lib/libaoss.so.0 instead of just
 libaoss.so.0 is my user error, but it is still easy to change Chapter 5
 Glibc so that it doesn't look at /etc/ld.so.preload. Just change the
 static const char preload_file[] initialization in elf/rtld.c.

 The bug also applies to DIY Linux.

Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2081>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.

More information about the lfs-book mailing list