diff options
| author | Josh Poimboeuf <jpoimboe@kernel.org> | 2025-09-17 19:03:33 +0300 |
|---|---|---|
| committer | Josh Poimboeuf <jpoimboe@kernel.org> | 2025-10-15 00:45:24 +0300 |
| commit | 31eca25f3a3b0de960ca9a478e5a4b2d0b2e8558 (patch) | |
| tree | cd33f15a7956b6961979c4d583ee3c5cb6405c3f /tools/objtool/elf.c | |
| parent | 34244f784c6d062af184944a25f40ab50dfdb67a (diff) | |
| download | linux-31eca25f3a3b0de960ca9a478e5a4b2d0b2e8558.tar.xz | |
objtool: Clean up compiler flag usage
KBUILD_HOSTCFLAGS and KBUILD_HOSTLDFLAGS aren't defined when objtool is
built standalone. Also, the EXTRA_WARNINGS flags are rather arbitrary.
Make things simpler and more consistent by specifying compiler flags
explicitly and tweaking the warnings. Also make a few code tweaks to
make the new warnings happy.
Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/elf.c')
| -rw-r--r-- | tools/objtool/elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index 2ea6d591c3c2..c27edeed2dd0 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -736,7 +736,7 @@ static int elf_update_symbol(struct elf *elf, struct section *symtab, } /* setup extended section index magic and write the symbol */ - if ((shndx >= SHN_UNDEF && shndx < SHN_LORESERVE) || is_special_shndx) { + if (shndx < SHN_LORESERVE || is_special_shndx) { sym->sym.st_shndx = shndx; if (!shndx_data) shndx = 0; |
