• Sami Tolvanen's avatar
    objtool: Fix __mcount_loc generation with Clang's assembler · 18a14575
    Sami Tolvanen authored
    When objtool generates relocations for the __mcount_loc section, it
    tries to reference __fentry__ calls by their section symbol offset.
    However, this fails with Clang's integrated assembler as it may not
    generate section symbols for every section. This patch looks up a
    function symbol instead if the section symbol is missing, similarly
    to commit e81e0724 ("objtool: Support Clang non-section symbols
    in ORC generation").
    Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
    18a14575
check.c 71.1 KB