Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'objtool_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool fixes from Borislav Petkov:

- Adjust objtool to handle a recent binutils change to not generate
unused symbols anymore.

- Revert the fail-the-build-on-fatal-errors objtool strategy for now
due to the ever-increasing matrix of supported toolchains/plugins and
them causing too many such fatal errors currently.

- Do not add empty symbols to objdump's rbtree to accommodate clang
removing section symbols.

* tag 'objtool_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
objtool: Don't fail on missing symbol table
objtool: Don't fail the kernel build on fatal errors
objtool: Don't add empty symbols to the rbtree

+17 -11
+5 -9
tools/objtool/check.c
··· 2928 2928 warnings += ret; 2929 2929 2930 2930 out: 2931 - if (ret < 0) { 2932 - /* 2933 - * Fatal error. The binary is corrupt or otherwise broken in 2934 - * some way, or objtool itself is broken. Fail the kernel 2935 - * build. 2936 - */ 2937 - return ret; 2938 - } 2939 - 2931 + /* 2932 + * For now, don't fail the kernel build on fatal warnings. These 2933 + * errors are still fairly common due to the growing matrix of 2934 + * supported toolchains and their recent pace of change. 2935 + */ 2940 2936 return 0; 2941 2937 }
+12 -2
tools/objtool/elf.c
··· 380 380 381 381 symtab = find_section_by_name(elf, ".symtab"); 382 382 if (!symtab) { 383 - WARN("missing symbol table"); 384 - return -1; 383 + /* 384 + * A missing symbol table is actually possible if it's an empty 385 + * .o file. This can happen for thunk_64.o. 386 + */ 387 + return 0; 385 388 } 386 389 387 390 symtab_shndx = find_section_by_name(elf, ".symtab_shndx"); ··· 451 448 list_add(&sym->list, entry); 452 449 elf_hash_add(elf->symbol_hash, &sym->hash, sym->idx); 453 450 elf_hash_add(elf->symbol_name_hash, &sym->name_hash, str_hash(sym->name)); 451 + 452 + /* 453 + * Don't store empty STT_NOTYPE symbols in the rbtree. They 454 + * can exist within a function, confusing the sorting. 455 + */ 456 + if (!sym->len) 457 + rb_erase(&sym->node, &sym->sec->symbol_tree); 454 458 } 455 459 456 460 if (stats)