[PATCH] D35152: Add some basic linker module symbols

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 12:50:57 PDT 2017


zturner updated this revision to Diff 105903.
zturner added a comment.

Update the test to properly check for x64, and finish up the remaining missing pieces.  In particular, we need the value of `argv[0]` in order to portably get the executable name, and we need the values of `argv[1]` - `argv[argc-1]` in order to write them to the `S_ENVBLOCK` symbol.  To address this, I deleted the global `Argv0` variable that LLD currently used, and instead stored the entire `argv` array in the global configuration object.

I also added a test.  Unfortunately checking for paths is pretty obnoxious in tests, requiring some magic sed incantation, so I've just regex'ed them all out in this test.  Perhaps someone else can do better here.


https://reviews.llvm.org/D35152

Files:
  lld/COFF/Config.h
  lld/COFF/Driver.cpp
  lld/COFF/Error.cpp
  lld/COFF/Error.h
  lld/COFF/PDB.cpp
  lld/COFF/PDB.h
  lld/COFF/Writer.cpp
  lld/test/COFF/pdb-linker-module.test
  llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35152.105903.patch
Type: text/x-patch
Size: 8835 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170710/ab1a378d/attachment.bin>


More information about the llvm-commits mailing list