[Bug tools/21332] New: elflint doesn't handle compressed sections

rguenth at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Thu Mar 30 09:13:00 GMT 2017


            Bug ID: 21332
           Summary: elflint doesn't handle compressed sections
           Product: elfutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tools
          Assignee: unassigned at sourceware dot org
          Reporter: rguenth at gcc dot gnu.org
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

On s390x we see

[   54s] FAIL: run-strip-strmerge.sh
[   55s] FAIL: run-elflint-self.sh
[   68s] # XFAIL: 0
[   68s] # FAIL:  2

cat home/abuild/rpmbuild/BUILD/elfutils-0.168/tests/run-strip-strmerge.sh.log 
elflint /home/abuild/rpmbuild/BUILD/elfutils-0.168/tests/elfstrmerge
No errors
elflint merged.elf
No errors
elflint merged.elf.stripped
No errors
elflint merged.elf.debug
No errors
elflint remerged.elf
No errors
elflint /home/abuild/rpmbuild/BUILD/elfutils-0.168/tests/elfstrmerge.o
section [28] '.symtab': symbol 109: st_value out of bounds
section [28] '.symtab': symbol 114: st_value out of bounds
FAIL run-strip-strmerge.sh (exit status: 1)

for example:

   109: 0000000000000cc7     0 NOTYPE  LOCAL  DEFAULT   23 .LASF354

  [23] .debug_str        PROGBITS         0000000000000000  00003829
       000000000000075a  0000000000000001 MSC       0     0     1

So it looks like this is an elflint bug which simply doesn't handle
compressed sections (C flag).  Or handling it bogously and just on s390x...

The source does

                  if (! ebl_check_special_symbol (ebl, ehdr, sym, name,
                      if (st_value - sh_addr > destshdr->sh_size)

and check_special_symbol has no implementation in the s390 backend.

Probably not relevant, but destshdr->sh_size may not be the uncompressed
size here as it is accessed just via gelf_getshdr which doesn't seem to do
any uncompression.

On x86_64 I do not see the debug strings in .symtab for some reason,
the relocations are done via .debug_str + offset (R_X86_64_32) while
on s390x we have .LASF8 + 0 (R_390_32).  Looks like a GNU as deficiency
on s390x to me though.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Elfutils-devel mailing list