[PATCH] D50917: [LLD] [COFF] Support MinGW automatic dllimport of data

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 10:23:02 PDT 2018


rnk added a comment.

Sigh. ELF supports too much and lets people do too much, and then we have to go reimplement that functionality badly for other object file formats that tried to be simple.

Anyway, we should do something. I understand that for many developers, Windows is a corner case platform and they are going to spend approximately zero effort porting their code to it, so this feature is valuable to them.

Will subsequent LLVM patches make the compiler use more general code sequences for global variable access, like an IAT load? That would address the list of architectural limitations you outlined.



================
Comment at: COFF/Chunks.h:161
 
+  void getRuntimePseudoRelocs(std::vector<RuntimePseudoReloc> *Res);
+
----------------
This can be a reference to indicate that it is required and not nullable.


================
Comment at: test/COFF/autoimport-arm-code.s:10
+
+# CHECK: error: unable to automatically import from variable with relocation type 0x11
+
----------------
Do we have a table to print relocations symbolically?


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D50917





More information about the llvm-commits mailing list