Skip to content

Commit 5e57595

Browse files
committed
Use replaceKeepingName
1 parent f103fd4 commit 5e57595

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lld/COFF/Symbols.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ bool Symbol::isLive() const {
100100
return true;
101101
}
102102

103-
// MinGW specific.
104103
void Symbol::replaceKeepingName(Symbol *other, size_t size) {
105104
StringRef origName = getName();
106105
memcpy(this, other, size);

lld/COFF/Writer.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,11 +2362,8 @@ void Writer::setECSymbols() {
23622362
if (auto thunkChunk =
23632363
dyn_cast<ECExportThunkChunk>(altEntrySym->getChunk()))
23642364
altEntrySym = thunkChunk->target;
2365-
Symbol *nativeEntrySym =
2366-
symtab->findUnderscore("__arm64x_native_entrypoint");
2367-
replaceSymbol<DefinedAbsolute>(
2368-
nativeEntrySym, ctx, "__arm64x_native_entrypoint",
2369-
ctx.config.imageBase + altEntrySym->getRVA());
2365+
symtab->findUnderscore("__arm64x_native_entrypoint")
2366+
->replaceKeepingName(altEntrySym, sizeof(SymbolUnion));
23702367
}
23712368
}
23722369
}

0 commit comments

Comments
 (0)