This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
binutils: symbolic instead of hard links for the utilities
- From: Wolfgang Grandegger <wg at grandegger dot com>
- To: binutils at sourceware dot org
- Cc: buildroot <buildroot at buildroot dot org>
- Date: Thu, 16 Nov 2017 09:00:49 +0100
- Subject: binutils: symbolic instead of hard links for the utilities
- Authentication-results: sourceware.org; auth=none
Hello,
in the buildroot [1] project, we are currently facing a problem with
hard linked utilities, e.g.:
./bin/x86_64-buildroot-linux-gnu-ar
./x86_64-buildroot-linux-gnu/bin/ar
To make a relocatable SDK, we sanitize and replace the absolute RPATH
directories of all ELF files with relative paths using "$ORIGIN". e.g.
"$ORIGIN/../lib". Unfortunately, this does not work with hard-linked
files in different levels of the file hierarchy. Using symbolic links
instead would fix the issue as the linker/loader seems to resolve
symbolic links before searching for the libs in the RPATH directories.
Is there a rational behind using hard in favor of symbolic links?
Does a configuration option using symbolic instead of hard links has a
chance to get accepted?
[1] https://buildroot.org/
Wolfgang.