llvm-capstone/bolt/test
Job Noorman 54ab954149 [BOLT] Reject symbols pointing to section end
Sometimes, symbols are present that point to the end of a section (i.e.,
one-past the highest valid address). Currently, BOLT either rejects
those symbols when they don't point to another existing section, or errs
when they do and the other section is not executable. I suppose BOLT
would accept the symbol when it points to an executable section.

In any case, these symbols should not be considered while discovering
functions and should not result in an error. This patch implements that.

Note that this patch checks explicitly for symbols whose value equals
the end of their section. It might make more sense to verify that the
symbol's value is within [section start, section end). However, I'm not
sure if this could every happen *and* its value does not equal the end.

Another way to implement this is to verify that the BinarySection we
find at the symbol's address actually corresponds to the symbol's
section. I'm not sure what the best approach is so feedback is welcome.

Reviewed By: yota9, rafauler

Differential Revision: https://reviews.llvm.org/D146215
2023-03-21 13:59:39 +04:00
..
AArch64 [BOLT] Add .relr.dyn section support 2023-03-17 17:24:19 +04:00
Inputs [BOLT] Add writable segment for allocatable sections 2023-03-15 00:06:55 +04:00
runtime [BOLT] Pass instrumentation-file arg for X86 xmm test 2023-03-13 13:37:28 +04:00
Unit [bolt] Clean up lit site cfg files a bit 2022-11-18 12:07:10 -05:00
X86 [BOLT] Reject symbols pointing to section end 2023-03-21 13:59:39 +04:00
bad-exe.test [BOLT] Restrict execution of tests that fail on Windows 2022-07-11 17:59:58 -07:00
bolt-icf.test [BOLT][TEST] Use double dash flags in tests 2022-06-10 16:27:33 -07:00
bolt-info.test [BOLT] Restrict execution of tests that fail on Windows 2022-07-11 17:59:58 -07:00
cache+-deprecated.test [BOLT][TEST] Use double dash flags in tests 2022-06-10 16:27:33 -07:00
CMakeLists.txt [BOLT] Process fragment siblings in lite mode, keep lite mode on 2023-02-08 19:11:27 -08:00
heatmap.test [BOLT] Refactor heatmap to be standalone tool 2022-02-07 22:00:44 +03:00
invalid-profile.test [BOLT] Restrict execution of tests that fail on Windows 2022-07-11 17:59:58 -07:00
keep-aranges.test [BOLT][TEST] Use double dash flags in tests 2022-06-10 16:27:33 -07:00
link_fdata.py [BOLT] Check no-LBR samples in mayHaveProfileData 2023-01-03 14:43:36 -08:00
lit.cfg.py [BOLT] Process fragment siblings in lite mode, keep lite mode on 2023-02-08 19:11:27 -08:00
lit.local.cfg [BOLT][TEST] Fix testing on macos 2022-05-13 13:03:47 -07:00
lit.site.cfg.py.in [bolt] Stop setting config.llvm_plugin_ext in lit.site.cfg.py.in 2022-11-22 20:29:14 -05:00
no-relocs.test [BOLT] Restrict execution of tests that fail on Windows 2022-07-11 17:59:58 -07:00
non-empty-debug-line.test [BOLT][TEST] Use double dash flags in tests 2022-06-10 16:27:33 -07:00
pie.test [BOLT] Restrict execution of tests that fail on Windows 2022-07-11 17:59:58 -07:00
R_ABS.pic.lld.cpp [BOLT] Restrict execution of tests that fail on Windows 2022-07-11 17:59:58 -07:00
re-optimize.test [BOLT] Restrict execution of tests that fail on Windows 2022-07-11 17:59:58 -07:00
reorder-data-writable-ptload.c [BOLT] Add writable segment for allocatable sections 2023-03-15 00:06:55 +04:00
shared-object.test [BOLT] Restrict execution of tests that fail on Windows 2022-07-11 17:59:58 -07:00
unreadable-profile.test [BOLT] Handle access errors while reading profile 2022-12-07 17:11:30 -08:00