#1005326 no-code-sections triggered on non-ELF files

#1005326#5
Date:
2022-02-11 10:38:04 UTC
From:
To:
Quack,

no-code-sections is triggered on dxvk, and also on wine, but these are
not ELF files since it's targeted for Windows. Of course an override is
possible but here there's an obvious way to avoid a false positive since
readelf fails with "readelf: Error: Not an ELF file - it has the wrong
magic bytes at the start", or maybe by using `objdump -a` or some other
method to first check the archive format (I'm really not an expert in
this area). Could you consider improving the check?

Regards.
\_o<

#1005326#10
Date:
2022-02-11 20:51:06 UTC
From:
To:
Hi,

Yes, I'd like to.

I confirmed that Lintian's invocation produces that error for
usr/lib/dxvk/wine64-development/d3d10.dll.a in dxvk, but how can we
tell such archives apart from those that are legitimately broken?

Kind regards
Felix Lechner

#1005326#15
Date:
2022-02-27 16:04:32 UTC
From:
To:
On Fri, 11 Feb 2022 12:51:06 -0800 Felix Lechner <felix.lechner@lease-up.com> wrote:

They contain valid object files, just not in ELF format. file matches them
correctly. Would a signature check be good enough?

Regards,

Stephen

#1005326#20
Date:
2022-11-01 22:43:31 UTC
From:
To:
for cross-building gpgv.exe as part of a windows installer signature
verification tool):

E: libassuan-mingw-w64-dev: no-code-sections [usr/i686-w64-mingw32/lib/libassuan.a]
E: libassuan-mingw-w64-dev: no-code-sections [usr/i686-w64-mingw32/lib/libassuan.dll.a]
E: libassuan-mingw-w64-dev: no-code-sections [usr/x86_64-w64-mingw32/lib/libassuan.a]
E: libassuan-mingw-w64-dev: no-code-sections [usr/x86_64-w64-mingw32/lib/libassuan.dll.a]

#1005326#27
Date:
2024-03-01 09:18:05 UTC
From:
To:
Hi
However, the report is currently not visible as lintian-overrides is in place:
https://sources.debian.org/src/wasi-libc/0.0~git20230113.4362b18-3/debian/wasi-libc.lintian-overrides/

It looks like we need some modification to the following code so we
can analyse non-ELF files using Lintian, but I have no clue how to
address it at the moment.
https://salsa.debian.org/lintian/lintian/-/blob/98e5ebd3f120e6200d293b81de8a49f33edef5c4/lib/Lintian/Check/Libraries/Static/NoCode.pm#L67-80

Best,
Fukui