lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230204154717.w3gef6jbuhpyardp@treble>
Date:   Sat, 4 Feb 2023 07:47:17 -0800
From:   Josh Poimboeuf <jpoimboe@...nel.org>
To:     Christophe Leroy <christophe.leroy@...roup.eu>
Cc:     Randy Dunlap <rdunlap@...radead.org>,
        Sathvika Vasireddy <sv@...ux.ibm.com>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "aik@...abs.ru" <aik@...abs.ru>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "mbenes@...e.cz" <mbenes@...e.cz>,
        "npiggin@...il.com" <npiggin@...il.com>,
        "chenzhongjin@...wei.com" <chenzhongjin@...wei.com>,
        "naveen.n.rao@...ux.vnet.ibm.com" <naveen.n.rao@...ux.vnet.ibm.com>,
        "Elliott, Robert (Servers)" <elliott@....com>
Subject: Re: [PATCH v2 15/16] objtool/powerpc: Enable objtool to be built on
 ppc

On Sat, Feb 04, 2023 at 02:10:34PM +0100, Christophe Leroy wrote:
> Ok, got the same problem as you with next-20230203
> 
>   DESCEND objtool
> <stdin>:1:10: fatal error: libelf.h: No such file or directory
> compilation terminated.
>   HOSTCC  /home/chleroy/linux-powerpc/tools/objtool/fixdep.o
>   HOSTLD  /home/chleroy/linux-powerpc/tools/objtool/fixdep-in.o
>   LINK    /home/chleroy/linux-powerpc/tools/objtool/fixdep
>   CC      /home/chleroy/linux-powerpc/tools/objtool/libsubcmd/exec-cmd.o
>   CC      /home/chleroy/linux-powerpc/tools/objtool/libsubcmd/help.o
>   CC      /home/chleroy/linux-powerpc/tools/objtool/libsubcmd/pager.o
>   CC /home/chleroy/linux-powerpc/tools/objtool/libsubcmd/parse-options.o
>   CC      /home/chleroy/linux-powerpc/tools/objtool/libsubcmd/run-command.o
>   CC      /home/chleroy/linux-powerpc/tools/objtool/libsubcmd/sigchain.o
>   CC /home/chleroy/linux-powerpc/tools/objtool/libsubcmd/subcmd-config.o
>   LD /home/chleroy/linux-powerpc/tools/objtool/libsubcmd/libsubcmd-in.o
>   AR      /home/chleroy/linux-powerpc/tools/objtool/libsubcmd/libsubcmd.a
>   INSTALL libsubcmd_headers
>   CC      /home/chleroy/linux-powerpc/tools/objtool/arch/powerpc/decode.o
>   CC      /home/chleroy/linux-powerpc/tools/objtool/arch/powerpc/special.o
>   LD /home/chleroy/linux-powerpc/tools/objtool/arch/powerpc/objtool-in.o
>   CC      /home/chleroy/linux-powerpc/tools/objtool/weak.o
>   CC      /home/chleroy/linux-powerpc/tools/objtool/check.o
>   CC      /home/chleroy/linux-powerpc/tools/objtool/special.o
>   CC      /home/chleroy/linux-powerpc/tools/objtool/builtin-check.o
>   CC      /home/chleroy/linux-powerpc/tools/objtool/elf.o
> elf.c: In function 'read_sections':
> elf.c:273:9: error: 'elf_getshnum' is deprecated
> [-Werror=deprecated-declarations]
>   273 |         if (elf_getshdrnum(elf->elf, &sections_nr)) {
>       |         ^~

This should be fixed with the latest tip/objtool/core which was rebased
today.  Here's the diff:

diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 29a8cd7449bf..83b100c1e7f6 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -36,7 +36,7 @@ OBJTOOL_CFLAGS := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBE
 OBJTOOL_LDFLAGS := $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
 
 # Allow old libelf to be used:
-elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)
+elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(HOSTCC) $(OBJTOOL_CFLAGS) -x c -E - | grep elf_getshdr)
 OBJTOOL_CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
 
 # Always want host compilation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ