[JITLink][MachO] Fix "find-symbol-by-address" logic.
authorLang Hames <lhames@gmail.com>
Sat, 13 Nov 2021 04:37:07 +0000 (20:37 -0800)
committerLang Hames <lhames@gmail.com>
Sat, 13 Nov 2021 05:28:32 +0000 (21:28 -0800)
commit2272ec1c63893e370e7dea8b946843d8d433d458
tree91878c8ea2631c790a4a4872109972691bb0bc72
parentefa896e5f7c393505f1bce2c9f530d1ba2b97720
[JITLink][MachO] Fix "find-symbol-by-address" logic.

Only search within the requested section, and allow one-past-then-end addresses.

This is needed to support section-end-address references to sections with no
symbols in them.
llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
llvm/test/ExecutionEngine/JITLink/X86/MachO_lookup_section_end_by_address.s [new file with mode: 0644]