projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad95c8d
)
[lld] Fix a warning
author
Kazu Hirata
<kazu@google.com>
Sun, 30 Oct 2022 20:33:33 +0000
(13:33 -0700)
committer
Kazu Hirata
<kazu@google.com>
Sun, 30 Oct 2022 20:33:33 +0000
(13:33 -0700)
This patch fixes:
lld/MachO/SyntheticSections.cpp: In member function ‘virtual void
lld::macho::ChainedFixupsSection::writeTo(uint8_t*) const’:
lld/MachO/SyntheticSections.cpp
patch
|
blob
|
history
diff --git
a/lld/MachO/SyntheticSections.cpp
b/lld/MachO/SyntheticSections.cpp
index
cc1b8f1
..
c1da641
100644
(file)
--- a/
lld/MachO/SyntheticSections.cpp
+++ b/
lld/MachO/SyntheticSections.cpp
@@
-2174,8
+2174,9
@@
void ChainedFixupsSection::writeTo(uint8_t *buf) const {
uint64_t nameOffset = 0;
for (auto [import, idx] : bindings) {
const Symbol &sym = *import.first;
- int16_t libOrdinal = needsWeakBind(sym) ? BIND_SPECIAL_DYLIB_WEAK_LOOKUP
- : ordinalForSymbol(sym);
+ int16_t libOrdinal = needsWeakBind(sym)
+ ? (int64_t)BIND_SPECIAL_DYLIB_WEAK_LOOKUP
+ : ordinalForSymbol(sym);
buf += writeImport(buf, importFormat, libOrdinal, sym.isWeakRef(),
nameOffset, import.second);
nameOffset += sym.getName().size() + 1;