[llvm-commits] [PATCH v2] Fix bits check in ELFObjectFile::isSectionZeroInit()

Sami Liedes sami.liedes at iki.fi
Fri Dec 28 11:39:59 PST 2012


Ok, here's v2 of the patches.

The first attached patch makes llvm-readobj output all sections in an
object file in addition to symbols and needed libraries, and adds a
test case for this functionality.

The second patch fixes the check in ELFObjectFile::isSectionZeroInit()
and modifies the test case to verify this.

Changes from v1:

* Test cases in the same patches as the functionality tested

* Reworked checkError() as suggested by Rafael EspĂ­ndola

* Avoid an if statement in the actual bug fix as suggested by Roman
  Divacky

* Functions now start by lower case letters. I was a bit aggressive
  and also changed the original function names in llvm-readobj.cpp to
  match this rule while making them static at the same time.

* Making those functions static exposed a dead function that was
  intended to print a header for the symbols dump. Fixed it; now the
  tool prints a header for the symbols and another for the sections.

	Sami
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-readobj-output-sections.patch
Type: text/x-diff
Size: 12784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121228/d5357423/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2-fix-elfobjectfile-issectionzeroinit.patch
Type: text/x-diff
Size: 1868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121228/d5357423/attachment-0001.patch>


More information about the llvm-commits mailing list