Thread (64 messages) 64 messages, 10 authors, 2023-02-04

Re: [PATCH v2 15/16] objtool/powerpc: Enable objtool to be built on ppc

flat view

From: Randy Dunlap <rdunlap@infradead.org>
Date: 2023-02-04 08:30:42
Also in: lkml


On 2/4/23 00:21, Randy Dunlap wrote:

On 2/4/23 00:19, Randy Dunlap wrote:
quoted
Hi--

On 8/29/22 23:41, Christophe Leroy wrote:
quoted

Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
quoted
This patch adds [stub] implementations for required
functions, inorder to enable objtool build on powerpc.
Not all powerpc it seems, see below
When cross-compiling PPC32 (on x86_64), I get 3600+ of these:

/bin/sh: line 1: ./tools/objtool/objtool: No such file or directory
/bin/sh: line 1: ./tools/objtool/objtool: No such file or directory
/bin/sh: line 1: ./tools/objtool/objtool: No such file or directory

Is there some way that objtool should work when cross-compiling?
Oops. Its build failed. I seem to be missing header file(s)
and possibly a library.
I'll check on those...
It's complaining about libelf.h but I have that, so I don't know where
it is looking other than /usr/include/libelf.h, which exists.
Maybe the tool isn't setup (ready) for cross-compiling?


Here's the build output for objtool:

<stdin>:1:10: fatal error: libelf.h: No such file or directory
compilation terminated.
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)) {
      |         ^~
In file included from /usr/include/gelf.h:32,
                 from /work/lnx/next/linux-next-20230203/tools/objtool/include/objtool/elf.h:10,
                 from elf.c:22:
/usr/include/libelf.h:310:12: note: declared here
  310 | extern int elf_getshnum (Elf *__elf, size_t *__dst)
      |            ^~~~~~~~~~~~
elf.c:278:9: error: ‘elf_getshstrndx’ is deprecated [-Werror=deprecated-declarations]
  278 |         if (elf_getshdrstrndx(elf->elf, &shstrndx)) {
      |         ^~
/usr/include/libelf.h:322:12: note: declared here
  322 | extern int elf_getshstrndx (Elf *__elf, size_t *__dst)
      |            ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [/work/lnx/next/linux-next-20230203/tools/build/Makefile.build:96: /work/lnx/next/linux-next-20230203/PPC32/tools/objtool/elf.o] Error 1

make[3]: *** [Makefile:66: /work/lnx/next/linux-next-20230203/PPC32/tools/objtool/objtool-in.o] Error 2


Thanks.
-- 
~Randy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help