You are not logged in.

#1 2017-07-17 22:45:01

Torxed
Member
Registered: 2013-01-10
Posts: 200

[Solved] ld.so (LD_PRELOAD) not following official mirror, why?

According to the official man-page of ld.so:

ld.so configuration files should be named /etc/ld.so.preload - NOT /etc/ld.so.conf.
I've gotten the impression that Arch tries to be as upstream as possible, any reason to this deviation?

This "breaks" at least one package that I know of, and that's community/afl.

(verified in both filesystem 2016.12-2 and filesystem 2017.03-2)

Last edited by Torxed (2017-07-18 07:06:37)

Offline

#2 2017-07-18 06:19:51

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [Solved] ld.so (LD_PRELOAD) not following official mirror, why?

Those two files are not the same thing. I'm not an expert in dynamic linking, but this is what I've gathered so far:

  • According to ldconfig(8), /etc/ld.so.conf is there for creating a cache (/etc/ld.so.cache) with paths to dynamic libraries. The dynamic linker (ld.so) then uses that cache to determine which libraries to link in when executing an a.out or ELF file.

  • According to ld.so(8), /etc/ld.so.preload serves the same purpose as setting the LD_PRELOAD variable, i.e. as a means to temporarily linking in a different library than usual.

ld.so(8) wrote:

/etc/ld.so.preload has a system-wide effect, causing the specified libraries to be preloaded for all programs that are executed on the system.  (This is usually undesirable, and is typically employed only as an emergency remedy, for example, as a temporary workaround to a library misconfiguration issue.)

If something breaks a package in [community], please explain how/why. If it turns out to be a bug rather than a misunderstanding, you may file a bug report at the bug tracker.


pkgshackscfgblag

Offline

#3 2017-07-18 07:06:10

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: [Solved] ld.so (LD_PRELOAD) not following official mirror, why?

Yupp, a missunderstanding on my behalf.
Two strikes in one night, I really should stop chugging energy drinks and thinking I've found something interesting 3AM.

`ld.so.conf` belongs to ldconfig and ld.so.preload is the ld.so LD_PRELOAD equivilant (ish), two different things.

The lack of ld.so.preload didn't break the package entirely, it continued with a simple try/catch but tried to access the file.
I was working out to sort out a problem with afl, which later turned out to be the second strike of my programming wizardry yesterday.
So I thought these were related, but they were in fact not.. And now I've learned two lessons.

Cheers for pointing out my mistake! I do appreciate it.

Best regards,
//Torxed

Offline

Board footer

Powered by FluxBB