]> granicus.if.org Git - llvm/commit
[llvm-dlltool] Set a proper machine type for weak symbol object files
authorMartin Storsjo <martin@martin.st>
Tue, 26 Mar 2019 09:02:44 +0000 (09:02 +0000)
committerMartin Storsjo <martin@martin.st>
Tue, 26 Mar 2019 09:02:44 +0000 (09:02 +0000)
commit5b28ef618dab3056eb1ce524dd504f9031ab88dc
treeae9b8a8f06cd2c8a0b985c015a40b163462979ee
parent1acf70e7f7cbcbc25089bbd0a780e272ffacbd3a
[llvm-dlltool] Set a proper machine type for weak symbol object files

This makes GNU binutils not reject the libraries outright.

GNU ld handles weak externals slightly differently though, so it
can't use them for aliases in import libraries, but this makes GNU
ld able to use the rest of the import libraries.

LLD accepted object files with machine type 0 aka
IMAGE_FILE_MACHINE_UNKNOWN.

Differential Revision: https://reviews.llvm.org/D59742

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356982 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Object/COFFImportFile.cpp
test/tools/llvm-dlltool/coff-weak-exports.def