[llvm-commits] [PATCH 3/3] Test case for readobj sections output. Part of fix for PR14723.
Rafael EspĂndola
rafael.espindola at gmail.com
Fri Dec 28 06:50:00 PST 2012
On 27 December 2012 18:20, Sami Liedes <sami.liedes at iki.fi> wrote:
> Test case for readobj sections output. Part of fix for PR14723.
Cool.
> There's still something curious in the output. For example, the first
> section returned by ObjectFile::begin_sections() has an empty
> name.
That is correct, the name is empty.
> I couldn't figure out what a "data section" is in LLVM parlance,
> but now for the .text section both .isTextSection() and
> .isDataSection() are true. I can figure out what the test in
> ELFObjectFile is, but the comments in the parent and other relevant
> classes seem to be silent on what the expected semantics is.
>
> The test in ELFObjectFile::isDataSection() is that ALLOC & WRITE is
> set (section is allocated in memory and is writable), and the section
> type is PROGBITS (section with initialized data or code). This is true
> for the .text section in
> test/Object/Inputs/shared-object-test.elf-i386.
That is a fuzzy concept for ELF. But note that the section is not
writable. The output from readelf is:
[ 4] .text PROGBITS 000001f0 0001f0 000013 00 AX 0 0 16
> Perhaps someone who knows ELF and the ObjectFile interface better
> could take a look at this and see if the current output makes sense.
I guess the best for now is to just put a {{.*}} instead of data in the test.
Thanks,
Rafael
More information about the llvm-commits
mailing list