[PATCH] D65903: [LLD] [COFF] Allow using custom .edata from input object files

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 02:17:50 PDT 2019


mstorsjo added a comment.

In D65903#1620514 <https://reviews.llvm.org/D65903#1620514>, @ruiu wrote:

> Is this due to the historical reason that wine is creating an `.edata` section instead of `-export` directive? I feel like this feature is obscure, and if there's a way to avoid adding this, I'd like to try that first. If GNU ld is fine with `-export` directive now, and wine's source code can be updated to use the directive (which is I believe a good refactoring as it would simplify the code), can wine's code be updated?


Wine supports building modules both as ELF and PE, and in ELF they generate the .edata manually, so they still need to keep that around, so using export directives isn't a simplification, it's yet another extra codepath.

And if I understood @jacek correctly, there was some case with relay stubs that don't map trivially to export directives.

While this is a very obscure feature, the implementation of it in lld turned out to be very straightforward (kind of like .idata chunks from long import libs, but much simpler).


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D65903





More information about the llvm-commits mailing list