[PATCH] D44292: [LLD] [COFF, MinGW] Implement the GNU ld flag --kill-at

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 9 01:44:40 PST 2018


mstorsjo created this revision.
mstorsjo added reviewers: ruiu, rnk, pcc, compnerd.
Herald added a subscriber: mehdi_amini.

GNU ld has got a number of different flags for adjusting how to behave around stdcall functions. The --kill-at flag strips the trailing sdcall suffix from exported functions (which otherwise is included by default in MinGW setups).

This also strips it from the corresponding import library though. That makes it hard to link to such an import library from code that calls the functions - but this matches what GNU ld does with this flag. Therefore, this flag is probably not sensibly used together with import libraries, but probably mostly when creating some sort of plugin, or if creating the import library separately with dlltool.

Reviewing both the COFF and MinGW parts of the patch at once, I can commit them separately if the change itself is fine.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44292

Files:
  COFF/Config.h
  COFF/Driver.cpp
  COFF/DriverUtils.cpp
  COFF/Options.td
  MinGW/Driver.cpp
  MinGW/Options.td
  test/COFF/def-export-stdcall.s
  test/MinGW/driver.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44292.137705.patch
Type: text/x-patch
Size: 5173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180309/3393ff22/attachment.bin>


More information about the llvm-commits mailing list