Bug 74391 - vdso doesn't compile when using ld.gold
Summary: vdso doesn't compile when using ld.gold
Status: RESOLVED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-18 12:48 UTC by Mike Lothian
Modified: 2014-04-22 22:45 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.15-rc1
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Mike Lothian 2014-04-18 12:48:36 UTC
Here's the error I get on a clean build

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
make[3]: 'arch/x86/realmode/rm/realmode.bin' is up to date.
  VDSO    arch/x86/vdso/vdso.so.dbg
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: arch/x86/vdso/vdso.lds:79:12: syntax error, unexpected ':'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: unable to parse script file arch/x86/vdso/vdso.lds
collect2: error: ld returned 1 exit status
  OBJCOPY arch/x86/vdso/vdso.so
objcopy: 'arch/x86/vdso/vdso.so.dbg': No such file
/usr/src/linux-3/arch/x86/vdso/Makefile:51: recipe for target 'arch/x86/vdso/vdso.so' failed
make[2]: *** [arch/x86/vdso/vdso.so] Error 1
scripts/Makefile.build:465: recipe for target 'arch/x86/vdso' failed
make[1]: *** [arch/x86/vdso] Error 2
Makefile:878: recipe for target 'arch/x86' failed
make: *** [arch/x86] Error 2


It was compiling before but not booting (from incremental git pulls and not doing make clean) - I tracked it down to:

26f5ef2e3c3c18f1dc31461ddf1db00b014edcd4 is the first bad commit
commit 26f5ef2e3c3c18f1dc31461ddf1db00b014edcd4
Author: H. Peter Anvin <hpa@linux.intel.com>
Date:   Tue Mar 25 13:41:36 2014 -0700

    x86, vdso: Actually discard the .discard sections
        
I'm using gcc-4.8.2 and binutils-2.24.51.0.3

Before this commit this all worked fine with ld.gold (and still works with ld.bfd)

The boot failure made it look like my root partition wasn't being mounted and there were spurious errors from journald
Comment 1 Mike Lothian 2014-04-18 12:55:06 UTC
I should also add that reverting that patch allows the kernel to compile again
Comment 2 Markus Trippelsdorf 2014-04-21 18:24:55 UTC
Here's a patch:
http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?id=378ed3ccd2a0404d031e771b65aa3af221ea8aea

Should be in the next rc hopefully.

Note You need to log in before you can comment on or make changes to this bug.