Package: file
Version: 1:5.30-1+deb9u1
Severity: normal

Dear Maintainer,

Please create an empty ELF shared object like this (needs libc6-dev):

$ gcc -shared -nostdlib -o dummy.so -Wl,--as-needed -lc

Now dummy.so has no program headers:

$ readelf -h dummy.so | fgrep program
  Start of program headers:          0 (bytes into file)
  Size of program headers:           0 (bytes)
  Number of program headers:         0

And file doesn't like this:

$ file dummy.so
dummy.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), corrupted 
program header size, not stripped

Sure, the program header size isn't the expected 56 bytes, but since there are
zero of them, this really shouldn't matter and isn't a sign of corruption.

Here is a similar issue concerning section headers as well:
https://bugzilla.redhat.com/show_bug.cgi?id=109509
Looks like RedHat hasn't upstreamed the fix.

And a related toolchain issue:
https://sourceforge.net/p/elftoolchain/tickets/550/

Please consider fixing this.
-- 
Thanks,
Feri.

-- System Information:
Debian Release: 9.1
  APT prefers stable-debug
  APT policy: (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages file depends on:
ii  libc6      2.24-11+deb9u1
ii  libmagic1  1:5.30-1+deb9u1
ii  zlib1g     1:1.2.8.dfsg-5

file recommends no packages.

file suggests no packages.

-- no debconf information

Reply via email to