We were previously ignoring weak externals during these searches (which
are used for the entry point, exports, and subsystem inference), which
differed from link.exe behavior. It also meant that we could get
different behavior when linking an object file directly vs. packaging it
into a static library, because static library symbol name directories
include weak externals.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lld/COFF/SymbolTable.cpp | ||
---|---|---|
817 | What this symbol is non-null but is Undefined (with itself possibly might be a weak symbol)? Do we need to make this a loop which inspects that aspect? Or is it not relevant for the usecases of findMangle where it is enough to see that we apparently did hit a real symbol and don’t need to check for prefixes? |
lld/COFF/SymbolTable.cpp | ||
---|---|---|
817 | getWeakAlias does that loop: https://github.com/llvm/llvm-project/blob/bbcffb08f0fdc0be8c8cba48410f9cb556ea661d/lld/COFF/Symbols.cpp#L123-L129 |
What this symbol is non-null but is Undefined (with itself possibly might be a weak symbol)? Do we need to make this a loop which inspects that aspect? Or is it not relevant for the usecases of findMangle where it is enough to see that we apparently did hit a real symbol and don’t need to check for prefixes?