[llvmlinux] [arch/x86/kernel/head64.c] In function `early_make_pgtable': undefined reference to `mcount'

Sedat Dilek sedat.dilek at gmail.com
Sat Jul 13 12:57:12 UTC 2013


On Thu, Jul 11, 2013 at 3:16 PM, Marcelo Sousa <marceloabsousa at gmail.com> wrote:
> That option should be generic. I dont know what that patch is fixing.
>

Please, do not top-post!
Thanks.

>
> On Thu, Jul 11, 2013 at 8:32 AM, Sedat Dilek <sedat.dilek at gmail.com> wrote:
>>
>> On Wed, Jul 10, 2013 at 12:12 PM, Marcelo Sousa
>> <marceloabsousa at gmail.com> wrote:
>> > mcount is related to ftrace, so perhaps you should enable that?
>> >
>>
>> Hmm, I can try to enable that one:
>>
>> # CONFIG_FTRACE is not set
>>

[ CCing pageexec ]

Unfortunately, it is the opposite:

With CONFIG_FTRACE=n (disabled) I am able to build a kernel (with the
kernel-config I normally use for my Linux-next builds).
But disabling it means dispense with a lot of tracing-support, this is no good.

>> I have seen that ARM has an additional ftrace fix.
>> You happen to know if this is arm-specific or not.
>> What is it fixing?
>>

I tried with this patch applied and CONFIG_FTRACE=y (enabled), but
this did not help.

I looked a bit trough ftrace.h and related "mcount" stuff...
Let's see what happens when:

1. CONFIG_FUNCTION_TRACER=n
2. CONFIG_DYNAMIC_FTRACE=n

I am not sure what 0033 [2] has for effects, it's not well documented.

- Sedat -

[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/x86/include/asm/ftrace.h?id=v3.10
[2] http://git.linuxfoundation.org/?p=llvmlinux.git;a=blob;f=arch/x86_64/patches/0033-Various-fixes-in-arch-x86-include-asm.patch

>> - Sedat -
>>
>> [1]
>> http://git.linuxfoundation.org/?p=llvmlinux.git;a=blob;f=arch/arm/patches/ftrace.patch
>>
>>
>>
>> >
>> > On Tue, Jul 9, 2013 at 11:19 PM, Sedat Dilek <sedat.dilek at gmail.com>
>> > wrote:
>> >>
>> >> On Tue, Jul 9, 2013 at 11:43 PM, Sedat Dilek <sedat.dilek at gmail.com>
>> >> wrote:
>> >> > On Tue, Jul 9, 2013 at 11:22 PM, Jan-Simon Möller
>> >> > <jsmoeller at linuxfoundation.org> wrote:
>> >> >> Good, now compare the provided config with yours and find the
>> >> >> option(s)
>> >> >> which
>> >> >> differ and provoke this.
>> >> >
>> >> > That's not a good advice - as both differ a lot.
>> >> > A list of Kconfig-options which are known to be problematic (BROKEN)
>> >> > would be helpful.
>> >> >
>> >> > I think I take llvmlinux's kernel-config with CONFIG_INTEL_MEI*
>> >> > enabled and see if this boots.
>> >> >
>> >>
>> >> NOPE, that did not work.
>> >> Enough testing for today.
>> >>
>> >> - Sedat -
>> >>
>> >> >> Then compare a gcc build with a clang build of that same file.
>> >> >>
>> >> >
>> >> > Did you look into the disassembled objdump?
>> >> > Or any other advice how to see why mcount is not referenced?
>> >> >
>> >> > - Sedat -
>> >> >
>> >> >> Best,
>> >> >> JS
>> >> >> --
>> >> >>
>> >> >> Sincerely yours,
>> >> >>
>> >> >> Jan-Simon Möller
>> >> >>
>> >> >> jsmoeller at linuxfoundation.org
>> >> >> On Tuesday 09 July 2013 23:15:20 Sedat Dilek wrote:
>> >> >>> From my build-log:
>> >> >>> [...]
>> >> >>>   LINK    vmlinux
>> >> >>>   LD      vmlinux.o
>> >> >>>   MODPOST vmlinux.o
>> >> >>>   GEN     .version
>> >> >>>   CHK     include/generated/compile.h
>> >> >>>   UPD     include/generated/compile.h
>> >> >>>   CC      init/version.o
>> >> >>>   LD      init/built-in.o
>> >> >>> arch/x86/kernel/head64.o: In function `early_make_pgtable':
>> >> >>> arch/x86/kernel/head64.c:(.init.text+0x2a): undefined reference to
>> >> >>> `mcount'
>> >> >>> arch/x86/kernel/head64.c:(.init.text+0x3e): undefined reference to
>> >> >>> `mcount'
>> >> >>> arch/x86/kernel/head64.c:(.init.text+0x4d): undefined reference to
>> >> >>> `mcount'
>> >> >>> arch/x86/kernel/head64.c:(.init.text+0xb1): undefined reference to
>> >> >>> `mcount'
>> >> >>> arch/x86/kernel/head64.c:(.init.text+0xd4): undefined reference to
>> >> >>> `mcount'
>> >> >>>
>> >> >>> arch/x86/kernel/head64.o:arch/x86/kernel/head64.c:(.init.text+0x106):
>> >> >>> more undefined references to `mcount' follow
>> >> >>> make[2]: *** [vmlinux] Error 1
>> >> >>> make[1]: *** [deb-pkg] Error 2
>> >> >>>
>> >> >>> - Sedat -
>> >> _______________________________________________
>> >> LLVMLinux mailing list
>> >> LLVMLinux at lists.linuxfoundation.org
>> >> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>> >
>> >
>
>


More information about the LLVMLinux mailing list