| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 |
|
| 23 | . "$(dirname "$0")/../lib.sh"
|
| 24 |
|
| 25 | setup
|
| 26 | build_pair static_call.c -DNO_ANNOTATE
|
| 27 |
|
| 28 | |
| 29 | |
| 30 | has_input_section orig.o .discard.annotate_data ||
|
| 31 | fail "fixture produced no annotation in the original"
|
| 32 | has_input_section patched.o .discard.annotate_data &&
|
| 33 | fail "patched object still has the annotation; nothing was stripped"
|
| 34 | assert_input_section .static_call_sites
|
| 35 |
|
| 36 | run_diff
|
| 37 |
|
| 38 | assert_patched target
|
| 39 | assert_section .static_call_sites
|
| 40 | assert_reloc_sym .static_call_sites target
|
| 41 |
|
| 42 | pass "static call site kept when the patch strips its data annotation"
|