[PATCH] D16092: [Coverage] Do not allocate memory for coverage map data (Linux)

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 11:49:00 PST 2016


On Tue, Feb 16, 2016 at 11:20 AM, Dave Bozier <seifsta at gmail.com> wrote:
> davidb added a comment.
>
>> As regarding the note section format, AFAIK, there is no formal
>
>>  specification in ELF. The organization mentioned in the document is
>
>>  for illustration purpose only.
>
>>
>
>> thanks,
>
>>
>
>> David
>
>
> I have found this description of note section in almost every ELF file format document I have, including the System V gABI. The GNU binutils such as readelf expect sections of SHT_NOTE to be in this format and will try to process it as such.
>
> marking these sections in linker script with a KEEP directive sounds like a much more appropriate fix.
>

I still think tools should not depend on the format, but you have a
good point about readelf's behavior.

Note that -fcoverage-mapping was never working with linker GC before
this patch. Making covmap a note section is an independent fix to that
problem.

I will work on a fix that uses the linker script solution to fix the GC problem.

David


>
> http://reviews.llvm.org/D16092
>
>
>


More information about the llvm-commits mailing list