ld.so.preload bad pattern substitution
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eglibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
On amd64 platform, as ld.so man page says, the pattern $LIB in ld.so.preload shoud be replaced by /lib for amd64 executables and /lib32 for x86 executables:
"$LIB The string $LIB (or equivalently ${LIB}) in an rpath corresponds to the system libraries
But in Ubuntu 12.04, $LIB is substituted by "x86_64-linux-gnu"
This is a test case:
FIRST: Set /etc/ld.so.preload content:
/$LIB/libMazing
SECOND: Exec strce ls -ald .
The following output shows the library that is trying to be loaded is /x86_64-
OUTPUT:
ERROR: ld.so: object '/$LIB/
execve("/bin/ls", ["ls", "-ald", "."], [/* 47 vars */]) = 0
brk(0) = 0x213c000
access(
mmap(NULL, 8192, PROT_READ|
access(
open("/
fstat(3, {st_mode=
mmap(NULL, 28, PROT_READ|
close(3) = 0
readlink(
open("/
writev(2, [{"ERROR: ld.so: object '", 22}, {"/$LIB/
) = 105
munmap(
Best Regards
B.Buades
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libc6 2.15-0ubuntu10
ProcVersionSign
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Thu May 3 14:44:12 2012
InstallationMedia: Ubuntu 10.04.2 LTS "Lucid Lynx" - Release amd64 (20110211.1)
ProcEnviron:
LANGUAGE=es_ES:en
TERM=xterm
PATH=(custom, user)
LANG=es_ES.UTF-8
SHELL=/bin/bash
SourcePackage: eglibc
UpgradeStatus: Upgraded to precise on 2012-05-03 (0 days ago)
On raring, $LIB is now completed to "lib/<triplet>" instead of just "<triplet>", which seems to match the pre-multiarch behaviour of just completing it to "lib", though neither matches the manpage's implication that there should be a slash prepended.