You are not logged in.

#1 2025-04-25 10:35:55

oech3
Member
Registered: 2017-09-03
Posts: 64

[Solved?]How to detect libararies used by dlopen without launching ?

namcap, ldd, or other tools some times miss Qt plugins required.

Is there any way to detect them without launching binary (on strace)?

This is also needed for repackaging non-free .deb, .rpm tarballs depending legacy version of libicu*.so optionally.

Last edited by oech3 (2025-04-29 07:57:20)

Offline

#2 2025-04-25 12:46:19

seth
Member
Registered: 2012-09-03
Posts: 63,501

Re: [Solved?]How to detect libararies used by dlopen without launching ?

strace or LD_DEBUG, but not

without launching binary

, notably since the object could be loaded by some linked library and opportunistically (load everything in path /usr/lib/qt6/plugins/foo/ or so)

The "d" in "dlopen" is for "dynamically" - at runtime.

Offline

#3 2025-04-27 07:57:35

oech3
Member
Registered: 2017-09-03
Posts: 64

Re: [Solved?]How to detect libararies used by dlopen without launching ?

Never implemented, but

namcap-run /pathto/program

could be possible in the future?

Last edited by oech3 (2025-04-27 07:58:29)

Offline

#4 2025-04-27 18:27:41

loqs
Member
Registered: 2014-03-06
Posts: 18,433

Re: [Solved?]How to detect libararies used by dlopen without launching ?

Offline

#5 2025-04-27 19:27:43

seth
Member
Registered: 2012-09-03
Posts: 63,501

Re: [Solved?]How to detect libararies used by dlopen without launching ?

https://gitlab.archlinux.org/archlinux/ … issues/271
Also

some times miss Qt plugins required

grep .note.dlopen /usr/lib/libQt6*.so

And while I'm not sure what "Qt plugins required" indicates, plugins are typically not a conclusive list, and afaict there's no path nor globbing in that spec, so how can that cover eg. reliance on https://archlinux.org/packages/extra/x8 … geformats/ ?

Hard dependency on libicuwhatever.so.xy could be covered but

repackaging non-free .deb, .rpm tarballs

will probably spoil that.

namcap-run /pathto/program

LD_DEBUG=files phototonic |& awk -F '([[:space:]]|=)' '/dynamically loaded/{print $6}'

But this will eg. also list your local style plugin and the libgl implementation drawn in by libglvnd

Offline

#6 2025-04-28 06:49:37

oech3
Member
Registered: 2017-09-03
Posts: 64

Re: [Solved?]How to detect libararies used by dlopen without launching ?

Thankyou. I did'nt know .note.dlopen section. But it seems recently introduced and may not used for legacy prebuild binary...

what "Qt plugins required" indicates

Automatic optdepends detection for packages.

also list your local style plugin and the libgl implementation drawn in by libglvnd

It seems surrender is an answer for me.

Offline

#7 2025-04-28 13:57:27

seth
Member
Registered: 2012-09-03
Posts: 63,501

Re: [Solved?]How to detect libararies used by dlopen without launching ?

It seems surrender is an answer for me.

92nd7o.jpg

You'll dlopen "false positives" but could maintain some blacklist (LD_DEBUG w/o the awk actually tells you what dlopens the library to ballpark its relevance) but any such approach will remain a heuristic, yes. Also because to detect such dlopened object, you'll need it locally.
The only way to know what X might dlopen but you've never heard of is to check the documentation, the code or back with the devs.

Offline

#8 2025-04-29 07:59:19

oech3
Member
Registered: 2017-09-03
Posts: 64

Re: [Solved?]How to detect libararies used by dlopen without launching ?

The only way to know what X might dlopen but you've never heard of is to check the documentation, the code or back with the devs.

OK (not OK).

Offline

Board footer

Powered by FluxBB