| Message ID | 20261030110417.3320489-1-anusmita.duttamazumder@arm.com |
|---|---|
| State | New |
| Headers | show |
| Series | [v2] systemd: Improve detection of executables and libraries | expand |
diff --git a/meta/recipes-core/systemd/dlopen-deps.inc b/meta/recipes-core/systemd/dlopen-deps.inc index 37074a9682..18c5595d14 100644 --- a/meta/recipes-core/systemd/dlopen-deps.inc +++ b/meta/recipes-core/systemd/dlopen-deps.inc @@ -61,7 +61,8 @@ python package_generate_dlopen_deps() { if cpath.islink(f): continue - if os.access(f, os.X_OK) or ".so." in f or f.endswith(".so"): + # Scan shared libraries and executable files for dlopen notes. + if cpath.is_executable(f) or ".so." in os.path.basename(f) or f.endswith(".so"): try: elf = oe.qa.ELFFile(f) elf.open()
Use cached mode bits to detect executables independently of host access permissions. Check shared-library basenames to avoid matching directory names. Signed-off-by: Anusmita Dutta Mazumder <anusmita.duttamazumder@arm.com> --- Changes in v2: - Replace the regex with basename string checks, as suggested. meta/recipes-core/systemd/dlopen-deps.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)