[PATCH] D134528: [llvm-readobj][COFF] Print forwarder export symbols correctly
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 23 05:57:51 PDT 2022
mstorsjo accepted this revision.
mstorsjo added a comment.
This revision is now accepted and ready to land.
LGTM, this looks reasonable to me!
================
Comment at: llvm/test/tools/llvm-readobj/COFF/exports-forwarder.yaml:12
+# clang -O2 --target=x86_64-windows-gnu test.c -nostdlib -c -o test.obj
+# lld-link -lldmingw -dll -out:test.dll -entry:entry -exclude-all-symbols -export:LoadLibrary=kernel32.LoadLibrary test.obj
+# test.c:
----------------
Nitpick, I think you could achieve the same here without `-lldmingw`, allowing you to lose `-exclude-all-symbols` too - and that would shrink the rdata by a couple bytes too.
(Mingw executables get a couple extra dummy bytes due to ctor/dtor list placeholders, see `insertCtorDtorSymbols` in Writer.cpp. In theory those placeholders could be symbols without any associated dummy data, but changing it would need to be synchronized across binutils/lld/mingw-w64-crt and would break mixing versions among all those.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134528/new/
https://reviews.llvm.org/D134528
More information about the llvm-commits
mailing list