Wrong expansion of $PLATFORM by ld.so on 18.04

Bug #1780723 reported by rojer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
New
Undecided
Unassigned

Bug Description

It seems that expansion of the $PLATFORM dynamic linker variable has changed between xenial and bionic:

rojer@xenial$ apt-cache policy libc6
libc6:
  Installed: 2.23-0ubuntu10
  Candidate: 2.23-0ubuntu10
rojer@xenial$ LD_PRELOAD='/foo/$LIB/$PLATFORM/bar.so' strace -f /bin/true 2>&1 | grep '^open.*foo'
open("/foo/lib/x86_64-linux-gnu/x86_64/bar.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

rojer@bionic$ apt-cache policy libc6
libc6:
  Installed: 2.27-3ubuntu1
  Candidate: 2.27-3ubuntu1
rojer@bionic$ LD_PRELOAD='/foo/$LIB/$PLATFORM/bar.so' strace -f /bin/true 2>&1 | grep '^open.*foo'
openat(AT_FDCWD, "/foo/lib/x86_64-linux-gnu/haswell/bar.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

What was `x86_64` before has changed to `haswell` which is way too specific and also doesn't match the man page for ld.so which clearly states:

       $PLATFORM (or equivalently ${PLATFORM})
              This expands to a string corresponding to the processor type of the host system (e.g., "x86_64"). On some architectures, the Linux kernel doesn't provide a platform string to the dynamic linker. The value of this string is taken
              from the AT_PLATFORM value in the auxiliary vector (see getauxval(3)).

I verified that `getauxval(AT_PLATFORM)` still returns `x86_64`.

Tags: bionic
tags: added: bionic
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.