[PATCH] D120645: [Object] Skip section offset checking for /<XFGHASHMAP>/

Pavel Samolysov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 04:08:30 PST 2022


psamolysov-intel marked 4 inline comments as done.
psamolysov-intel added inline comments.


================
Comment at: llvm/lib/Object/Archive.cpp:259-260
       return Name;
+    // System libraries from Windows SDK for Window 11 contain this symbol,
+    // it looks like a CFG guard, we just skip it for now.
+    if (Name.equals("/<XFGHASHMAP>/"))
----------------
jhenderson wrote:
> Some grammar nits.
Thank you, I've applied the suggestion.


================
Comment at: llvm/test/tools/llvm-lib/xfghashmap-list.test:7
+RUN: llvm-lib /out:xfghashmap.lib a.obj b.obj
+RUN: %python %S/Inputs/xfghashmap-inserter.py xfghashmap.lib b.obj/
+
----------------
jhenderson wrote:
> Rather than put the python file in a separate file to the test file, you can include it inline as follows:
> 
> 1) Add comment markers to the start of every RUN and CHECK line, (e.g. `# RUN: ...`).
> 2) Change the existing comment to use double-comment markers (not strictly needed, but it helps it stand out (i.e. `## This should ...`).
> 3) Add the contents of the python script to the end of this test file.
> 4) Reference the script by using `%s` in your python execution.
> 
> Also, I'd put a brief comment somewhere, either at the start of the python script, or immediately before this RUN line, explaining what the script does.
Thank you for the idea, I've encapsulated the script into the test, it works!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120645/new/

https://reviews.llvm.org/D120645



More information about the llvm-commits mailing list