This is an archive of the discontinued LLVM Phabricator instance.

Add test for r211904 - llvm-objdump: don't assert if ELF file has no sections
ClosedPublic

Authored by emaste on Jun 30 2014, 11:27 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

emaste updated this revision to Diff 10980.Jun 30 2014, 11:27 AM
emaste retitled this revision from to Add test for r211904 - llvm-objdump: don't assert if ELF file has no sections.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added a reviewer: rafael.
emaste added a subscriber: Unknown Object (MLST).
emaste added inline comments.Jun 30 2014, 12:30 PM
test/Object/objdump-no-sectionheaders.test
4 ↗(On Diff #10980)

Some tools e.g. readelf explicitly report that the section table is empty / does not exist - e.g. There are no sections in this file.

GNU objdump matches this behaviour - i.e., outputs the header, but an empty table.

Sections:
Idx Name          Size      VMA               LMA               File off  Algn

This output seems reasonable to me - I just don't know how to match the EOF with lit in order to verify that no sections were output.

rafael edited edge metadata.Jun 30 2014, 1:01 PM

I think you can use

; CHECK-NOT: {{.}}

in the end of the file.

LGTM with that.

BTW, I don't think reviews.llvm.org works with binary files.

emaste closed this revision.Jun 30 2014, 1:11 PM
emaste updated this revision to Diff 10984.

Closed by commit rL212059 (authored by @emaste).