| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 |
|
| 7 | . "$(dirname "$0")/../lib.sh"
|
| 8 |
|
| 9 | setup
|
| 10 | build_pair new_data.c
|
| 11 |
|
| 12 | |
| 13 | |
| 14 | |
| 15 | has_input_symbol "$orig_obj" klp_new_data &&
|
| 16 | fail "fixture put klp_new_data in the original; nothing new to carry"
|
| 17 | has_input_symbol "$patched_obj" klp_new_data ||
|
| 18 | fail "compiler did not emit klp_new_data; the fixture tests nothing"
|
| 19 | in_relocs "$patched_obj" | grep -q 'klp_new_data' ||
|
| 20 | fail "target() does not reference klp_new_data; the fixture tests nothing"
|
| 21 |
|
| 22 | run_diff
|
| 23 |
|
| 24 | assert_patched target
|
| 25 | assert_symbol klp_new_data
|
| 26 |
|
| 27 | pass "new data carried into the patch"
|