[Buildroot] binutils: symbolic instead of hard links for the utilities

Wolfgang Grandegger wg at grandegger.com
Thu Nov 16 08:00:49 UTC 2017


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.


More information about the buildroot mailing list