tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fixing $ORGIN RPATHs - at least some of them



On 05.11.2017 15:04, Martin Husemann wrote:
> The patch below makes ld.elf_so try to fall back to /proc/current/exe
> if the kernel did not pass an execname in AUX and $ORIGIN needs to
> be expanded.
> 

I propose to use sysctl(2) with KERN_PROC_PATHNAME.

There are few problems with this interface that should be fixed:
 - hardlinks can give wrong results,
 - no support for null mounts,
 - max returned size is restricted to PATH_MAX/2,
 - if a file name is longer than 31 characters we return failure.

Reading /proc/current/exe uses the same algorithm under the neath.


Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index