diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2024-08-01 19:14:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-01 19:14:11 +0200 |
commit | 7da1dbb632ca490c2ab3c2d6ff46cccda38c7acd (patch) | |
tree | a7e35a2ff1fda7e082223ec55f89e4cd96e9cbb1 /llvm/lib/Object/MachOObjectFile.cpp | |
parent | 0c31123c8599bfd9d67549f6174812fbcf988d78 (diff) | |
download | llvm-7da1dbb632ca490c2ab3c2d6ff46cccda38c7acd.zip llvm-7da1dbb632ca490c2ab3c2d6ff46cccda38c7acd.tar.gz llvm-7da1dbb632ca490c2ab3c2d6ff46cccda38c7acd.tar.bz2 |
[MachO] Remove redundant bounds check (#100176)
The condition was duplicated, the correct one for this message would
have been `ImportsEnd > SymbolsEnd`. However, this is a subset of
`ImportEnd > Symbols` (since `Symbols <= SymbolsEnd`), so it can be
removed altogether.
I made this thinko in 686d8ce.
Note that that change wasn't intended to be permanent, and served as a
quick stopgap to facilitate testing chained fixups in LLD before Apple
upstreamed their implementation.
Fixes #90662
Fixes #87203
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 812b2c0..ff55a84 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -5195,11 +5195,6 @@ MachOObjectFile::getDyldChainedFixupTargets() const { if (ImportsEnd > Symbols) return malformedError("bad chained fixups: imports end " + - Twine(ImportsEndOffset) + " extends past end " + - Twine(DyldChainedFixups.datasize)); - - if (ImportsEnd > Symbols) - return malformedError("bad chained fixups: imports end " + Twine(ImportsEndOffset) + " overlaps with symbols"); // We use bit manipulation to extract data from the bitfields. This is correct |