Re: [PATCH v12 00/21] Compile-time stack metadata validation

From: Chris J Arges
Date: Tue Sep 15 2015 - 12:57:32 EST


I got the following compiler error when building v12 of this patchset:

DESCEND stacktool
CC stacktool.o
CC elf.o
CC special.o
CC arch/x86/decode.o
LD arch/x86/stacktool-in.o
LD stacktool-in.o
Warning: stacktool: x86 instruction decoder differs from kernel
LINK stacktool
stacktool-in.o: In function `elf_close':
(.text+0xe7c): undefined reference to `elf_end'
stacktool-in.o: In function `elf_open':
(.text+0xec7): undefined reference to `elf_version'
stacktool-in.o: In function `elf_open':
(.text+0xf29): undefined reference to `elf_begin'
stacktool-in.o: In function `elf_open':
(.text+0xf42): undefined reference to `gelf_getehdr'
stacktool-in.o: In function `elf_open':
(.text+0xf59): undefined reference to `elf_getshdrnum'
stacktool-in.o: In function `elf_open':
(.text+0xf6f): undefined reference to `elf_getshdrstrndx'
stacktool-in.o: In function `elf_open':
(.text+0xfc9): undefined reference to `elf_getscn'
stacktool-in.o: In function `elf_open':
(.text+0xfdd): undefined reference to `elf_ndxscn'
stacktool-in.o: In function `elf_open':
(.text+0xff2): undefined reference to `gelf_getshdr'
stacktool-in.o: In function `elf_open':
(.text+0x100e): undefined reference to `elf_strptr'
stacktool-in.o: In function `elf_open':
(.text+0x1029): undefined reference to `elf_getdata'
stacktool-in.o: In function `elf_open':
(.text+0x1101): undefined reference to `elf_nextscn'
stacktool-in.o: In function `elf_open':
(.text+0x119e): undefined reference to `gelf_getsym'
stacktool-in.o: In function `elf_open':
(.text+0x11b8): undefined reference to `elf_strptr'
stacktool-in.o: In function `elf_open':
(.text+0x13d4): undefined reference to `gelf_getrela'
collect2: error: ld returned 1 exit status
Makefile:33: recipe for target 'stacktool' failed
make[2]: *** [stacktool] Error 1
Makefile:53: recipe for target 'stacktool' failed
make[1]: *** [stacktool] Error 2
Makefile:1502: recipe for target 'tools/stacktool' failed
make: *** [tools/stacktool] Error 2

The patch below addresses this issue for me.

--