[lld-macho] Symbol::value should always be uint64_t
D98837 migrated a bunch of `value`s to uint64_t, but missed these.
GitOrigin-RevId: 2461804b484e53e448632de0b195ce187e9b0b04
diff --git a/MachO/InputFiles.cpp b/MachO/InputFiles.cpp
index 66dcca0..8e55463 100644
--- a/MachO/InputFiles.cpp
+++ b/MachO/InputFiles.cpp
@@ -485,7 +485,8 @@
nextIsec->data = isec->data.slice(symbolOffset);
isec->data = isec->data.slice(0, symbolOffset);
- // By construction, the symbol will be at offset zero in the new section.
+ // By construction, the symbol will be at offset zero in the new
+ // subsection.
symbols[symIndex] =
createDefined(sym, name, nextIsec, /*value=*/0, symbolSize);
// TODO: ld64 appears to preserve the original alignment as well as each
diff --git a/MachO/SymbolTable.cpp b/MachO/SymbolTable.cpp
index 127d513..76d4289 100644
--- a/MachO/SymbolTable.cpp
+++ b/MachO/SymbolTable.cpp
@@ -159,7 +159,7 @@
}
Defined *SymbolTable::addSynthetic(StringRef name, InputSection *isec,
- uint32_t value, bool isPrivateExtern,
+ uint64_t value, bool isPrivateExtern,
bool includeInSymtab) {
Defined *s = addDefined(name, nullptr, isec, value, /*size=*/0,
/*isWeakDef=*/false, isPrivateExtern);
diff --git a/MachO/SymbolTable.h b/MachO/SymbolTable.h
index 8a5c16c..29aa03e 100644
--- a/MachO/SymbolTable.h
+++ b/MachO/SymbolTable.h
@@ -52,7 +52,7 @@
Symbol *addLazy(StringRef name, ArchiveFile *file,
const llvm::object::Archive::Symbol &sym);
- Defined *addSynthetic(StringRef name, InputSection *, uint32_t value,
+ Defined *addSynthetic(StringRef name, InputSection *, uint64_t value,
bool isPrivateExtern, bool includeInSymtab);
ArrayRef<Symbol *> getSymbols() const { return symVector; }