| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 |
|
| 9 | . "$(dirname "$0")/../lib.sh"
|
| 10 |
|
| 11 | setup
|
| 12 | build_pair static_local.c
|
| 13 |
|
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | local_sym="$(in_symbols orig.o |
|
| 19 | awk '$4 == "OBJECT" && $5 == "LOCAL" && $8 ~ /counter/ { print $8; exit }')"
|
| 20 | [ -n "$local_sym" ] || fail "fixture produced no local 'counter' symbol"
|
| 21 |
|
| 22 | run_diff
|
| 23 | assert_section __klp_relocs.vmlinux
|
| 24 |
|
| 25 | |
| 26 | assert_no_section ".klp.rela.vmlinux..text.target"
|
| 27 |
|
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | assert_tombstone "$local_sym"
|
| 34 |
|
| 35 | run_post_link
|
| 36 |
|
| 37 | |
| 38 | |
| 39 | assert_klp_rela vmlinux .text.target
|
| 40 | assert_livepatch_sym "$local_sym"
|
| 41 |
|
| 42 | pass "klp relocations converted to .klp.rela with SHN_LIVEPATCH symbols"
|