diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2019-06-26 01:09:52 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2019-06-26 01:09:52 +0000 |
commit | 06036dbc6e91d31946c57cf8a00c67b901fbba91 (patch) | |
tree | 74d1fa05afd8aa8bb8d0866e4fe8eb379958579a /llvm/lib/MC/WinCOFFObjectWriter.cpp | |
parent | d38e251bf2f94a49caf739fe6281f34cca4274e9 (diff) | |
download | llvm-06036dbc6e91d31946c57cf8a00c67b901fbba91.zip llvm-06036dbc6e91d31946c57cf8a00c67b901fbba91.tar.gz llvm-06036dbc6e91d31946c57cf8a00c67b901fbba91.tar.bz2 |
MC: correct the emission of weak aliases in COFF
The weak alias should have the characteristics set to
`IMAGE_EXTERN_WEAK_SEARCH_ALIAS` to indicate that the weak external here
is a symbol alias and that the symbol is aliased to a locally defined
symbol. We were previously setting the characteristics to
`IMAGE_EXTERN_WEAK_SEARCH_LIBRARY` which indicates that the symbol
should be looked for in the libraries.
llvm-svn: 364370
Diffstat (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/WinCOFFObjectWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp index 1dfb1cf..0e6c05b 100644 --- a/llvm/lib/MC/WinCOFFObjectWriter.cpp +++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp @@ -387,7 +387,7 @@ void WinCOFFObjectWriter::DefineSymbol(const MCSymbol &MCSym, Sym->Aux[0].AuxType = ATWeakExternal; Sym->Aux[0].Aux.WeakExternal.TagIndex = 0; Sym->Aux[0].Aux.WeakExternal.Characteristics = - COFF::IMAGE_WEAK_EXTERN_SEARCH_LIBRARY; + COFF::IMAGE_WEAK_EXTERN_SEARCH_ALIAS; } else { if (!Base) Sym->Data.SectionNumber = COFF::IMAGE_SYM_ABSOLUTE; |