Handling $ORIGIN strings within DT_NEEDED entries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
What documentation says:
From what documentation says, it looks like $ORIGIN string should be recognized within DT_NEEDED entries.
(Sorry, in initial version of bug-report I misinterpreted one of sentences in documentation, taking it out of context.)
See "System V Application Binary Interface - DRAFT - 10 June 2013" / "Chapter 5 - Program Loading and Dynamic Linking" / "Dynamic Linking" / "Shared Object Dependencies" / "Substitution Sequences" <http://
What in reality happens:
- Having $ORIGIN string within DT_NEEDED entry and shared library that DOES NOT uses versioning, causes '$ORIGIN' to be interpreted as path-to-
- Having $ORIGIN string within DT_NEEDED entry and shared library that USES versioning, causes assertion failure (see below) or segmentation fault (not on my system).
On my system, having $ORIGIN within DT_NEEDED together with versioning causes the following output: "Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_
I'd better report the bug to libc maintainers (upstream). Because it seems to be not downstream-related. But the libc bug reporting policy says: "Distributions may include their own modifications to glibc in the binaries and sources you get with the operating system. If the glibc you are using comes from a complete operating system distribution, you should report bugs to that distribution project first." So, I report here first.
1) lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04
2) apt-cache policy libc6
libc6:
Installed: 2.23-0ubuntu4
Candidate: 2.23-0ubuntu4
Version table:
*** 2.23-0ubuntu4 500
500 http://
100 /var/lib/
2.23-0ubuntu3 500
500 http://
3) I expected $ORIGIN strings within DT_NEEDED entries to be either always recognized or not recognized.
4) Behavior depends on whether shared object is versioned or not. With non-versioned shared object it seems to be ok. With versioned shared object it causes assertion failure (or segmentation fault on some other platforms).
summary: |
- Handling $ORIGIN strings within DT_NEEDED sections + Handling $ORIGIN strings within DT_NEEDED entries |
description: | updated |
description: | updated |