[PATCH] D40531: Emit function IDs table for Control Flow Guard

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 09:12:22 PST 2017


rnk added a comment.

In https://reviews.llvm.org/D40531#942898, @amccarth wrote:

> In https://reviews.llvm.org/D40531#939683, @rnk wrote:
>
> > Take a look at llvm/lib/MC/MCParser/COFFAsmParser.cpp and add the .symidx directive following the example of ParseDirectiveSecIdx. You can test it in test/MC/COFF/symidx.s with llvm-readobj.
>
>
> I've added the directive, but I'm not clear on what to do in the test.


I think we discussed this, right? You can use the secidx.s test as an example for how to right a symidx.s test, something like:

  // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -symbols -sections -section-data | FileCheck %s
  .text
  foo:
    ret
  bar:
    ret
  .data
    .symidx foo
    .symidx bar

Then you can have CHECK lines for the foo and bar symbol table entires, and that the .data section has two numbers with the appropriate indices.


https://reviews.llvm.org/D40531





More information about the llvm-commits mailing list