Opened 17 years ago

Closed 16 years ago

#2081 closed defect (fixed)

Chapter 5 Glibc looks at /etc/ld.so.preload

Reported by: alexander@… Owned by: DJ Lucas
Priority: high Milestone: 6.4
Component: Book Version: 6.3
Severity: normal Keywords:
Cc:

Description

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.

Change History (4)

comment:1 by bdubbs@…, 16 years ago

Milestone: 7.06.4

comment:2 by randy@…, 16 years ago

Priority: normalhigh

Again, something that needs to be put in sooner than later. It is altering the instructions for one of the toolchain packages (perhaps the most important one) in the Chapter 5 build.

Bumping the priority. I see the version is marked 6.3 but doesn't it also apply to SVN? If not, then it is errata material, and not something we need to do for the next release.

comment:3 by DJ Lucas, 16 years ago

Owner: changed from lfs-book@… to DJ Lucas
Status: newassigned

I can drop this one in too and see what happens, but I seriously doubt that it'll cause any issues.

sed -i 's@/etc/ld.so.preload@/tools/etc/ld.so.preload@' elf/rtld.c

comment:4 by DJ Lucas, 16 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r8645.

Note: See TracTickets for help on using tickets.