llvm-project/bolt/test/X86
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
..
Inputs [BOLT] Use LTO fuzzy name matching in function-order 2023-01-25 11:43:10 -08:00
addr32.s
asm-dump.c
asm-func-debug.test
avx512-trap.test
bb-with-two-tail-calls.s
block-reordering.test
bolt-address-translation-internal-call.test
bolt-address-translation.test
branch-data.test
broken_dynsym.test [BOLT] Reintroduce allow-stripped 2023-02-06 18:08:13 -08:00
bug-reorder-bb-jrcxz.s
call-zero.s
cfi-expr-rewrite.s
cfi-instrs-count.s
cfi-instrs-reordered.s
cmov-conversion.s
ctc-and-unreachable.test
data-to-data-pcrel.s
debug-fission-single.s
double-jump.test
double-rel.s
dummy-eh-frame-bug.s
dwarf-handle-visit-loclist-error.s
dwarf-test-df-logging.test [BOLT][DWARF] Add logging for split dwarf 2023-01-27 15:50:55 -08:00
dwarf3-lowpc-highpc-convert.s
dwarf4-df-dualcu-loclist.test
dwarf4-df-dualcu.test
dwarf4-ftypes-dwo-input-dwp-output.test
dwarf4-ftypes-dwp-input-dwo-output.test
dwarf4-ftypes-dwp-input-dwp-output.test
dwarf4-size-0-inlined_subroutine.s
dwarf4-split-dwarf-no-address.test
dwarf5-addr-section-reuse.s [BOLT][DWARF] Reuse entries in .debug_addr when not modified 2023-01-24 15:55:03 -08:00
dwarf5-call-pc-function-null-check.test
dwarf5-call-pc.test
dwarf5-cu-no-debug-addr.test
dwarf5-debug-info-dwarf4-debug-line.s
dwarf5-debug-line.s
dwarf5-debug-loclists.s [BOLT][DWARF] Change loclist encoding to use base_addrx 2023-01-20 11:30:34 -08:00
dwarf5-df-dualcu-loclist.test [BOLT][DWARF] Change loclist encoding to use base_addrx 2023-01-20 11:30:34 -08:00
dwarf5-df-dualcu.test [BOLT][DWARF] Change rangelists to use DW_RLE_offset_pair 2023-01-06 13:45:43 -08:00
dwarf5-df-mono-dualcu.test [BOLT][DWARF] Change rangelists to use DW_RLE_offset_pair 2023-01-06 13:45:43 -08:00
dwarf5-dwarf4-monolithic.test [BOLT][DWARF] Change loclist encoding to use base_addrx 2023-01-20 11:30:34 -08:00
dwarf5-ftypes-dwp-input-dwo-output.test
dwarf5-label-low-pc.s
dwarf5-locaddrx.test
dwarf5-locexpr-addrx.s [BOLT][DWARF] Change rangelists to use DW_RLE_offset_pair 2023-01-06 13:45:43 -08:00
dwarf5-loclist-offset-form.test [BOLT][DWARF] Change loclist encoding to use base_addrx 2023-01-20 11:30:34 -08:00
dwarf5-lowpc-highpc-convert.s
dwarf5-multiple-dw-op-addrx-locexpr.s [BOLT][DWARF] Change rangelists to use DW_RLE_offset_pair 2023-01-06 13:45:43 -08:00
dwarf5-rangeoffset-to-rangeindex.s
dwarf5-return-pc-form-addr.test
dwarf5-return-pc.test
dwarf5-shared-str-offset-base.s
dwarf5-split-dwarf4-monolithic.test [BOLT][DWARF] Change loclist encoding to use base_addrx 2023-01-20 11:30:34 -08:00
dwarf5-two-loclists.test [BOLT][DWARF] Change loclist encoding to use base_addrx 2023-01-20 11:30:34 -08:00
dwarf5-two-rnglists.test [BOLT][DWARF] Change loclist encoding to use base_addrx 2023-01-20 11:30:34 -08:00
dynrelocs.s
encoding-validation.s
end-symbol.test
exceptions-args.test
fallthrough-to-noop.test
false-jump-table.s
fptr-addend-pcrel.s
fragment-lite-reverse.s [BOLT] Process fragment siblings in lite mode, keep lite mode on 2023-02-08 19:11:27 -08:00
fragment-lite.s [BOLT] Process fragment siblings in lite mode, keep lite mode on 2023-02-08 19:11:27 -08:00
fragmented-symbols.s
frame-opt-lea.s
function-order-lite.s [BOLT] Use LTO fuzzy name matching in function-order 2023-01-25 11:43:10 -08:00
gdbindex.test
gotpcrelx.s
high_pc_udata.s
icf-jump-tables.test
icp-inline.s
indirect-goto.test
inline-debug-info.test
inlined-function-mixed.test
insert-addr-rnglists_base.s
insert-debug-info-entry.test
instrumentation-eh_frame_hdr.cpp [BOLT] Add writable segment for allocatable sections 2023-03-15 00:06:55 +04:00
internal-call-instrument-so.s
internal-call-instrument.s
interprocedural-ref-entry-point.s
is-strip.s [BOLT][TEST] Fix is-strip test for NFC testing 2023-02-07 12:19:00 -08:00
issue20.s
issue20.test
issue26.s
issue26.test
jmp-after-ret.s
jmp-optimization.test
jmpjmp.test
jt-symbol-disambiguation-3.s [bolt][test] Add REQUIRES: asserts to jt-symbol-disambiguation-3.s 2023-01-16 17:50:46 -08:00
jump-table-footprint-reduction.test
jump-table-icp.test
jump-table-move.s
jump-table-pic-conflict.s
jump-table-pic-order.test
jump-table-reference.test
layout-heuristic.test
line-number.test
lit.local.cfg
loop-inversion-pass.s
loop-nest.test
lto-name-match.s [BOLT] Handle __uniq suffix added by -funique-internal-linkage-names 2023-01-20 19:23:06 -08:00
merge-fdata-bat-mode.test
merge-fdata-output.test
no-entry-reordering.test
no-output.test
nolbr.s [BOLT] Check no-LBR samples in mayHaveProfileData 2023-01-03 14:43:36 -08:00
nop-function.s
plt-mold.test
plt-sec-8-byte.test
plt-sec.test
pre-aggregated-perf.test
pseudoprobe-decoding-inline.test [BOLT] fix tests on arm64 2023-02-25 16:46:50 +00:00
pseudoprobe-decoding-noinline.test [BOLT] fix tests on arm64 2023-02-25 16:46:50 +00:00
reader.test
relaxed-tailcall.test
remove-unused.test
rodata-simpl-loads.test
sctc-bug.test
sctc-bug2.test
sctc-bug3.test
sctc-bug4.test
section-end-sym.s [BOLT] Reject symbols pointing to section end 2023-03-21 13:59:39 +04:00
shared_object_entry.s
shared-abbrev.s
shorten-mov.test
shrinkwrapping-and-rsp.s
shrinkwrapping-critedge.s
shrinkwrapping-do-not-pessimize.s
shrinkwrapping-insertcfi.s
shrinkwrapping-lea.s
shrinkwrapping-mov.s
shrinkwrapping-pop-order.s
shrinkwrapping-popf.s
shrinkwrapping-restore-position.s
shrinkwrapping.test
split-all-lptrampoline.s
split-all.s
split-func-icf.s [BOLT] Process fragment siblings in lite mode, keep lite mode on 2023-02-08 19:11:27 -08:00
split-func-jump-table-fragment-bidirection.s
split-func-jump-table-fragment-noparent.s
split-func-jump-table-fragment-reverse.s
split-func-jump-table-fragment.s
split-func-jump-table-unknown.s [BOLT] Prevent unsetting unknown control flow for split jump table 2023-02-27 15:22:43 -08:00
split-landing-pad.s
split-random.s
srol-bug.test
static-exe.test
symtab-secondary-entries.test
tail-duplication-cache.s
tail-duplication-cacheline.s
tail-duplication-complex.s
tail-duplication-jt.s
tail-duplication-pass.s
tail-duplication-prop-bug.s
tailcall-traps.test
tailcall.test
unclaimed-jt-entries.s
unreachable.test
vararg.test
zero-sized-object.s