[PATCH] [FaultMaps] Add a parser for the __llvm__faultmaps section.

Sanjoy Das sanjoy at playingwithpointers.com
Thu Jun 18 18:20:35 PDT 2015


On Thu, Jun 18, 2015 at 4:59 PM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> ----------------
>> rafael wrote:
>>> Do you really need to use llc? Can't you use llvm-mc or even check in a binary?
>> Unless you have strong objections, I'd like to keep this test because I think it is valuable to check that the parser can parse the output of `-enable-implicit-null-checks`.  I'll add a second test that works with `llvm-mc`.
>
> In which case you should do
>
> llc ... -o %t.s < %s
> llvm-mc ... -o %t.o  < %t.s
>
> We really should only use "llc -filetype=obj" when there a code path
> that is only ever used with that.

I see.  I think I've fixed this in the latest patch, and have made the
test work like compact-unwind.ll.  PTAL.

>
>> Right now the faultmaps section is generated only for x86_64.
>
> Why the template then?

Because the host (the binary reading and parsing the section) could be
big-endian?  llvm-objdump built for and running on a BE architecture
should be able to parse an __llvm_faultmaps generated on x86.

That said, supporting BE is definitely not something I require, and if
you think that makes things clearer, I'm happy to just
static_assert(host is LE) and drop the templating.

>
> Cheers,
> Rafael




More information about the llvm-commits mailing list