mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-02 18:58:15 +00:00
[BOLT][Wrapper] Fix off-by-one in find_section upper limit
find_section used to match offsets equal to file_offset + size causing offsets to sometimes be attributed to the wrong section. Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D149047
This commit is contained in:
parent
4054c68644
commit
8a5a12057e
@ -246,7 +246,7 @@ def find_section(offset, readelf_hdr):
|
||||
file_offset = int(cols[5], 16)
|
||||
# section size
|
||||
size = int(cols[2], 16)
|
||||
if offset >= file_offset and offset <= file_offset + size:
|
||||
if offset >= file_offset and offset < file_offset + size:
|
||||
if sys.stdout.isatty(): # terminal supports colors
|
||||
print(f"\033[1m{line}\033[0m")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user