Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1742341

Re: Problems compiling with KCFLAGS="-frecord-gcc-switches"

From Josh Poimboeuf <jpoimboe@redhat.com>
Newsgroups linux.kernel
Subject Re: Problems compiling with KCFLAGS="-frecord-gcc-switches"
Date 2017-09-29 23:00 +0200
Message-ID <uvay6-2Kr-3@gated-at.bofh.it> (permalink)
References <uv9LI-2sg-31@gated-at.bofh.it> <uvaeK-2D7-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 29, 2017 at 01:38:43PM -0700, Guenter Roeck wrote:
> On Fri, Sep 29, 2017 at 01:00:56PM -0700, Guenter Roeck wrote:
> > Hi Josh,
> > 
> > when trying to compile an image with KCFLAGS="-frecord-gcc-switches",
> > I get the folllowing build warning/error.
> > 
> > make allmodconfig
> > KCFLAGS="-frecord-gcc-switches" make arch/x86/kvm/emulate.o
> > ./tools/objtool/objtool check --no-unreachable "arch/x86/kvm/emulate.o"
> > 
> > arch/x86/kvm/emulate.o: warning:
> > 	objtool: .GCC.command.line+0x0: special: can't find new instruction
> > 
> > Building a full image aborts with:
> > 
> > WARNING: arch/x86/kvm/kvm.o(__ex_table+0x4c): Section mismatch in reference
> > 	from the (unknown reference) (unknown)
> > 	to the variable .GCC.command.line:kvm_fastop_exception
> > FATAL: The relocation at __ex_table+0x4c references
> > section ".GCC.command.line" which is not executable, IOW
> > the kernel will fault if it ever tries to
> > jump to it.  Something is seriously wrong
> > and should be fixed.
> > make[2]: *** [arch/x86/kvm/kvm.o] Error 1
> > 
> > Any idea what might cause this problem ?
> > 
> 
> Here is another interesting problem, seen when building arm64 allmodconfig
> -CONFIG_CPU_BIG_ENDIAN +CONFIG_EFI.
> 
> kallsyms failure:
> 	relative symbol value 0xffffff9008073000 out of range in relative mode
> 
> This is due to symbols such as
> 
> 000000000000000e n __efistub_$d
> 
> in the symbol table. Those are not filtered out by kallsyms, resulting in a
> relative "base" address of 0x0e, and all other symbols are out of range.
> Those symbols are only generated in efi/libstubs.
> 
> Any idea what might be going on there, and how to fix it ?
> An easy fix would be something like
> 
> -       else if (stype == 'N')
> +       else if (toupper(stype) == 'N')
> 
> in kallsyms, but that doesn't seem like a clean solution to me.

Not sure... What does 'n' mean?  I don't see it in the man page for nm.

-- 
Josh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Problems compiling with KCFLAGS="-frecord-gcc-switches" Guenter Roeck <linux@roeck-us.net> - 2017-09-29 22:10 +0200
  Re: Problems compiling with KCFLAGS="-frecord-gcc-switches" Guenter Roeck <linux@roeck-us.net> - 2017-09-29 22:40 +0200
    Re: Problems compiling with KCFLAGS="-frecord-gcc-switches" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-09-29 23:00 +0200
      Re: Problems compiling with KCFLAGS="-frecord-gcc-switches" Guenter Roeck <linux@roeck-us.net> - 2017-09-30 01:10 +0200
  Re: Problems compiling with KCFLAGS="-frecord-gcc-switches" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-09-29 22:50 +0200
    Re: Problems compiling with KCFLAGS="-frecord-gcc-switches" Guenter Roeck <linux@roeck-us.net> - 2017-09-30 03:10 +0200

csiph-web