Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1225425
| From | Chris J Arges <chris.j.arges@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v12 00/21] Compile-time stack metadata validation |
| Date | 2015-09-15 19:00 +0200 |
| Message-ID | <q91Ki-2gb-1@gated-at.bofh.it> (permalink) |
| References | <q6NBL-4jS-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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. -- From 9ec5827aa726300394c0155657820f2595008116 Mon Sep 17 00:00:00 2001 From: Chris J Arges <chris.j.arges@canonical.com> Date: Tue, 15 Sep 2015 16:45:27 +0000 Subject: [PATCH] x86/stacktool: Fix LDFLAGS order in Makefile When building tools/stacktool I get a compiler error which causes libelf to not properly link. This patch adjusts the LDFLAG after the object file, which allows gcc to properly link. Signed-off-by: Chris J Arges <chris.j.arges@canonical.com> --- tools/stacktool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/stacktool/Makefile b/tools/stacktool/Makefile index 87a3ee0..9f5d2f9 100644 --- a/tools/stacktool/Makefile +++ b/tools/stacktool/Makefile @@ -39,7 +39,7 @@ $(STACKTOOL): $(STACKTOOL_IN) diff -I'^#include' arch/x86/insn/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \ diff -I'^#include' arch/x86/insn/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \ || echo "Warning: stacktool: x86 instruction decoder differs from kernel" >&2 )) || true - $(QUIET_LINK)$(CC) $(LDFLAGS) $(STACKTOOL_IN) -o $@ + $(QUIET_LINK)$(CC) $(STACKTOOL_IN) $(LDFLAGS) -o $@ clean: $(call QUIET_CLEAN, stacktool) $(RM) $(STACKTOOL) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v12 00/21] Compile-time stack metadata validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:30 +0200
[PATCH v12 16/21] x86/asm/crypto: Create stack frames in clmul_ghash_mul/update() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 21/21] x86/asm/power: Create stack frames in hibernate_asm_64.S Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 15/21] x86/asm/crypto: Move jump_table to .rodata section Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 17/21] x86/asm/entry: Create stack frames in thunk functions Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 05/21] x86/stacktool: Add file and directory ignores Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 19/21] x86/asm: Create stack frames in rwsem functions Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 18/21] x86/asm/acpi: Create a stack frame in do_suspend_lowlevel() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
[PATCH v12 20/21] x86/asm/efi: Create a stack frame in efi_call() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-09 15:40 +0200
Re: [PATCH v12 00/21] Compile-time stack metadata validation Chris J Arges <chris.j.arges@canonical.com> - 2015-09-15 19:00 +0200
Re: [PATCH v12 00/21] Compile-time stack metadata validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-15 20:20 +0200
[PATCH 3/3] kprobes/x86: stacktool: ignore kretprobe_trampoline_holder Chris J Arges <chris.j.arges@canonical.com> - 2015-09-18 00:20 +0200
Re: [PATCH 3/3] kprobes/x86: stacktool: ignore kretprobe_trampoline_holder Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-18 16:10 +0200
[PATCH 2/3] x86/stacktool: Ignore head_$(BITS) files. Chris J Arges <chris.j.arges@canonical.com> - 2015-09-18 00:20 +0200
Re: [PATCH 2/3] x86/stacktool: Ignore head_$(BITS) files. Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-18 16:00 +0200
[PATCH 1/3] x86/uaccess: Add stack frame output operand in get_user inline asm Chris J Arges <chris.j.arges@canonical.com> - 2015-09-18 00:20 +0200
Re: [PATCH 1/3] x86/uaccess: Add stack frame output operand in get_user inline asm Josh Poimboeuf <jpoimboe@redhat.com> - 2015-09-18 16:00 +0200
[PATCH 0/3] A few stacktool warning fixes. Chris J Arges <chris.j.arges@canonical.com> - 2015-09-18 00:20 +0200
csiph-web