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.

objtool: Avoid emptying lists for duplicate sections

When a to-be-created section already exists, there's no point in
emptying the various lists if their respective sections already exist.
In fact it's better to leave them intact as they might get used later.

Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

-4
-4
tools/objtool/check.c
··· 635 635 636 636 sec = find_section_by_name(file->elf, ".static_call_sites"); 637 637 if (sec) { 638 - INIT_LIST_HEAD(&file->static_call_list); 639 638 WARN("file already has .static_call_sites section, skipping"); 640 639 return 0; 641 640 } ··· 850 851 851 852 sec = find_section_by_name(file->elf, ".cfi_sites"); 852 853 if (sec) { 853 - INIT_LIST_HEAD(&file->call_list); 854 854 WARN("file already has .cfi_sites section, skipping"); 855 855 return 0; 856 856 } ··· 898 900 899 901 sec = find_section_by_name(file->elf, "__mcount_loc"); 900 902 if (sec) { 901 - INIT_LIST_HEAD(&file->mcount_loc_list); 902 903 WARN("file already has __mcount_loc section, skipping"); 903 904 return 0; 904 905 } ··· 942 945 943 946 sec = find_section_by_name(file->elf, ".call_sites"); 944 947 if (sec) { 945 - INIT_LIST_HEAD(&file->call_list); 946 948 WARN("file already has .call_sites section, skipping"); 947 949 return 0; 948 950 }