• A
    kallsyms: fix nonconverging kallsyms table with lld · c6b3ef1b
    Arnd Bergmann 提交于
    stable inclusion
    from stable-5.10.17
    commit 3dc2ba46500124ac350f9cd1a378e799f8f7fc88
    bugzilla: 48169
    
    --------------------------------
    
    [ Upstream commit efe6e306 ]
    
    ARM randconfig builds with lld sometimes show a build failure
    from kallsyms:
    
      Inconsistent kallsyms data
      Try make KALLSYMS_EXTRA_PASS=1 as a workaround
    
    The problem is the veneers/thunks getting added by the linker extend
    the symbol table, which in turn leads to more veneers being needed,
    so it may take a few extra iterations to converge.
    
    This bug has been fixed multiple times before, but comes back every time
    a new symbol name is used. lld uses a different set of identifiers from
    ld.bfd, so the additional ones need to be added as well.
    
    I looked through the sources and found that arm64 and mips define similar
    prefixes, so I'm adding those as well, aside from the ones I observed. I'm
    not sure about powerpc64, which seems to already be handled through a
    section match, but if it comes back, the "__long_branch_" and "__plt_"
    prefixes would have to get added as well.
    Signed-off-by: NArnd Bergmann <arnd@arndb.de>
    Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
    Signed-off-by: NSasha Levin <sashal@kernel.org>
    Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
    Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
    c6b3ef1b
kallsyms.c 18.1 KB