[llvm-commits] [PATCH 3/3] Test case for readobj sections output. Part of fix for PR14723.
Sean Silva
silvas at purdue.edu
Thu Dec 27 15:44:21 PST 2012
Please try to keep test cases in the same patch that they add tests for.
-- Sean Silva
On Thu, Dec 27, 2012 at 4:20 PM, Sami Liedes <sami.liedes at iki.fi> wrote:
> Test case for readobj sections output. Part of fix for PR14723.
>
> There's still something curious in the output. For example, the first
> section returned by ObjectFile::begin_sections() has an empty
> name.
>
> 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.
>
> Perhaps someone who knows ELF and the ObjectFile interface better
> could take a look at this and see if the current output makes sense.
>
> This is the output for the above file:
>
> Sections:
> 0 0 0 rodata
> .hash d4 34 4 required,rodata
> .dynsym 108 80 4 required,rodata
> .dynstr 188 62 1 required,rodata
> .text 1f0 13 10 text,data,required
> .eh_frame 204 40 4 data,required,rodata
> .tdata 1244 4 4 data,required
> .dynamic 1248 70 4 required
> .got.plt 12b8 c 4 data,required
> .data 12c4 4 4 data,required
> .bss 12c8 4 4 bss,required,virtual,zeroinit
> .shstrtab 0 65 1 rodata
> .symtab 0 160 4 rodata
> .strtab 0 78 1 rodata
> Total: 14
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list