lkml.org 
[lkml]   [2020]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 05/10] objtool: check: Remove check preventing branches within alternative
    Date
    While jumping from outside an alternative region to the middle of an
    alternative region is very likely wrong, jumping from an alternative
    region into the same region is valid. It is a common pattern on arm64.

    The first pattern is unlikely to happen in practice and checking only
    for this adds a lot of complexity.

    Just remove the current check.

    Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
    Signed-off-by: Julien Thierry <jthierry@redhat.com>
    ---
    tools/objtool/check.c | 6 ------
    1 file changed, 6 deletions(-)

    diff --git a/tools/objtool/check.c b/tools/objtool/check.c
    index 5c03460f1f07..6af14a55490d 100644
    --- a/tools/objtool/check.c
    +++ b/tools/objtool/check.c
    @@ -2037,12 +2037,6 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
    insn = first;
    sec = insn->sec;

    - if (insn->alt_group && list_empty(&insn->alts)) {
    - WARN_FUNC("don't know how to handle branch to middle of alternative instruction group",
    - sec, insn->offset);
    - return 1;
    - }
    -
    while (1) {
    next_insn = next_insn_same_sec(file, insn);

    --
    2.21.1
    \
     
     \ /
      Last update: 2020-03-27 16:30    [W:4.219 / U:0.296 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site