History

objtool: Fix error handling for STD/CLD warnings

Actually return an error (and display a backtrace, if requested) for directional bit warnings.

Josh Poimboeuf committed 5 years ago

Commit 6f567c91 parent c9c324d1 file · +6 −2Browse files

Showing the changes to tools/objtool (1 of 1 file). Show all

Unified · Split

tools/objtool/check.c+6−2
@@ -2651,15 +2651,19 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, · 2650 unmodified lines
26512651 break;
26522652
26532653 case INSN_STD:
2654− if (state.df)
2654+ if (state.df) {
26552655 WARN_FUNC("recursive STD", sec, insn->offset);
2656+ return 1;
2657+ }
26562658
26572659 state.df = true;
26582660 break;
26592661
26602662 case INSN_CLD:
2661− if (!state.df && func)
2663+ if (!state.df && func) {
26622664 WARN_FUNC("redundant CLD", sec, insn->offset);
2665+ return 1;
2666+ }
26632667
26642668 state.df = false;
26652669 break;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t