[llvm-dev] X86/X86_64: "Add support for __gnu_mcount_nc as the pg interface"

Sedat Dilek via llvm-dev llvm-dev at lists.llvm.org
Sun Apr 10 12:04:49 PDT 2016

Hi Saleem,

can you help with your patch "Add support for __gnu_mcount_nc as the
pg interface" for X86/X86_64?

Here, I am on Linux/x86 and playing with the llvmlinux patchset.
More precisely, I use Linux v4.4 with LongTermSupport and
llvm-toolchain v3.8.0 on Ubuntu/precise AMD64.
So, I would like to test an adapted patch for X86 (64-Bit).

My build breaks like this...

+ ld -m elf_x86_64 --build-id --build-id -o .tmp_vmlinux1 -T
./arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_64.o
arch/x86/kernel/head64.o arch/x86/kernel/head.o init/built-in.o
--start-group usr/built-in.o arch/x86/built-in.o kernel/built-in.o
certs/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o
security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a
arch/x86/lib/lib.a lib/built-in.o arch/x86/lib/built-in.o
drivers/built-in.o sound/built-in.o firmware/built-in.o
arch/x86/pci/built-in.o arch/x86/power/built-in.o
arch/x86/video/built-in.o arch/x86/ras/built-in.o net/built-in.o
virt/built-in.o --end-group
arch/x86/kernel/head64.o: In function `early_make_pgtable':
arch/x86/kernel/head64.c:(.init.text+0x1f): undefined reference to `_mcount'
arch/x86/kernel/head64.c:(.init.text+0x51): undefined reference to `_mcount'
arch/x86/kernel/head64.c:(.init.text+0x60): undefined reference to `_mcount'
arch/x86/kernel/head64.c:(.init.text+0xdc): undefined reference to `_mcount'
arch/x86/kernel/head64.c:(.init.text+0x110): undefined reference to `_mcount'
more undefined references to `_mcount' follow
+ on_exit

Any help appreciated.

- Sedat -

[1] https://github.com/llvm-mirror/clang/commit/160a24cdf41b735dcb0013aa2f517f2dda74435a

More information about the llvm-dev mailing list