mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-14 12:59:41 -07:00
update weak vs undefined replacement rule
This commit is contained in:
1 parent
d7cdaa98b5
commit
e1b7168605
2 files changed
+8
-1
No files matched your search
@@ -141,7 +141,11 @@ lnk_can_replace_symbol(LNK_Symbol *dst, LNK_Symbol *src)
|
||||
|
||||
COFF_SymbolWeakExt *weak_ext = coff_parse_weak_tag(weak_parsed, weak->defined.obj->header.is_big_obj);
|
||||
if (weak_ext->characteristics == COFF_WeakExt_SearchLibrary) {
|
||||
can_replace = lnk_symbol_defined_is_before(dst, src);
|
||||
// NOTE: MSVC does not let a weak symbol to replace an undefined one,
|
||||
// but LLD links without errors or warnings, meaning undefined symbols
|
||||
// are resolved to the weak, which can potentially change behaviour of
|
||||
// the linked image
|
||||
can_replace = dst_interp == COFF_SymbolValueInterp_Weak;
|
||||
} else if (weak_ext->characteristics == COFF_WeakExt_NoLibrary) {
|
||||
can_replace = dst_interp == COFF_SymbolValueInterp_Weak;
|
||||
} else if (weak_ext->characteristics == COFF_WeakExt_SearchAlias) {
|
||||
|
||||
Reference in new issue
Block a user