Commit 34c861e
objtool: Fix sibling call detection in alternatives
In add_jump_destinations(), sibling call detection requires 'insn->func'
to be valid. But alternative instructions get their 'func' set in
handle_group_alt(), which runs *after* add_jump_destinations(). So
sibling calls in alternatives code don't get properly detected.
Fix that by changing the initialization order: call
add_special_section_alts() *before* add_jump_destinations().
This also means the special case for a missing 'jump_dest' in
add_jump_destinations() can be removed, as it has already been dealt
with.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/c02e0a0a2a4286b5f848d17c77fdcb7e0caf709c.1649718562.git.jpoimboe@redhat.com1 parent 26ff604 commit 34c861e
1 file changed
+17
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1277 | 1277 | | |
1278 | 1278 | | |
1279 | 1279 | | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
1280 | 1287 | | |
1281 | 1288 | | |
1282 | 1289 | | |
| |||
1308 | 1315 | | |
1309 | 1316 | | |
1310 | 1317 | | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | 1318 | | |
1321 | 1319 | | |
1322 | 1320 | | |
| |||
1549 | 1547 | | |
1550 | 1548 | | |
1551 | 1549 | | |
1552 | | - | |
| 1550 | + | |
1553 | 1551 | | |
1554 | | - | |
1555 | | - | |
1556 | | - | |
1557 | | - | |
1558 | | - | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
1559 | 1557 | | |
1560 | 1558 | | |
1561 | 1559 | | |
| |||
2254 | 2252 | | |
2255 | 2253 | | |
2256 | 2254 | | |
2257 | | - | |
2258 | | - | |
| 2255 | + | |
| 2256 | + | |
2259 | 2257 | | |
2260 | | - | |
| 2258 | + | |
2261 | 2259 | | |
2262 | 2260 | | |
2263 | 2261 | | |
2264 | | - | |
| 2262 | + | |
2265 | 2263 | | |
2266 | 2264 | | |
2267 | 2265 | | |
| |||
0 commit comments