| 1 | #!/bin/bash |
| 2 | # SPDX-License-Identifier: GPL-2.0 |
| 3 | # |
| 4 | # A klp relocation section is named for the object being patched, not for the |
| 5 | # object which happens to own the symbol being referenced. Deriving it from |
| 6 | # the symbol means a cross-module reference lands in a section for an object |
| 7 | # the patch may not even touch, so the relocation is never applied and the call |
| 8 | # goes somewhere arbitrary. |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | # The fixture has to have built as a module for any of this to mean anything. |
| 16 | | || |
| 17 | |
| 18 | |
| 19 | # other_mod_func belongs to a different module than the one being patched. |
| 20 | |
| 21 | |
| 22 | |
| 23 | # Named for the patched object ... |
| 24 | |
| 25 | # ... not for the object owning the symbol. |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 |