Actually return an error (and display a backtrace, if requested) for directional bit warnings.
Showing the changes to tools/objtool (1 of 1 file). Show all
Unified · Split
| @@ -2651,15 +2651,19 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, · 2650 unmodified lines | ||
| 2651 | 2651 | break; |
| 2652 | 2652 | |
| 2653 | 2653 | case INSN_STD: |
| 2654 | − if (state.df) | |
| 2654 | + if (state.df) { | |
| 2655 | 2655 | WARN_FUNC("recursive STD", sec, insn->offset); |
| 2656 | + return 1; | |
| 2657 | + } | |
| 2656 | 2658 | |
| 2657 | 2659 | state.df = true; |
| 2658 | 2660 | break; |
| 2659 | 2661 | |
| 2660 | 2662 | case INSN_CLD: |
| 2661 | − if (!state.df && func) | |
| 2663 | + if (!state.df && func) { | |
| 2662 | 2664 | WARN_FUNC("redundant CLD", sec, insn->offset); |
| 2665 | + return 1; | |
| 2666 | + } | |
| 2663 | 2667 | |
| 2664 | 2668 | state.df = false; |
| 2665 | 2669 | break; |