Skip to content

Commit 84e7611

Browse files
committed
Further weak-symbol-linking fixes
1 parent 1e093ab commit 84e7611

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/linking/linking.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -574,12 +574,7 @@ void linkingt::duplicate_code_symbol(
574574
new_symbol,
575575
"function declaration conflicts with with weak definition");
576576
else
577-
{
578-
// new weak symbol should have been renamed
579-
assert(!new_symbol.is_weak);
580577
old_symbol.value.make_nil();
581-
old_symbol.is_weak=false;
582-
}
583578
}
584579
else if(new_symbol.is_weak)
585580
{
@@ -593,12 +588,6 @@ void linkingt::duplicate_code_symbol(
593588
new_symbol,
594589
"ignoring conflicting weak function declaration");
595590
}
596-
else
597-
{
598-
// new weak symbol should have been renamed
599-
assert(!old_symbol.is_weak);
600-
old_symbol.is_weak=true;
601-
}
602591
}
603592
// mismatch on number of parameters is definitively an error
604593
else if((old_t.parameters().size()<new_t.parameters().size() &&
@@ -759,6 +748,7 @@ void linkingt::duplicate_code_symbol(
759748
rename_symbol(new_symbol.type);
760749
old_symbol.value=new_symbol.value;
761750
old_symbol.type=new_symbol.type; // for parameter identifiers
751+
old_symbol.is_weak=new_symbol.is_weak;
762752
}
763753
else if(to_code_type(old_symbol.type).get_inlined())
764754
{

0 commit comments

Comments
 (0)