Cannot build arm64 kernel with CONFIG_DEBUG_INFO=y

Bug #1258013 reported by zenon xiu on 2013-12-05
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Linux Baseline
Fix Released
Undecided
Andrey Konovalov
Linaro Toolchain Binaries
Invalid
Undecided
Yvan Roux

Bug Description

Hi team,

when I tried to build the aarch64 kernel with CONFIG_DEBUG_INFO=y for kernel debugging, an error was reported,

  CHK include/generated/uapi/linux/version.h
  CHK include/generated/utsrelease.h
  CALL scripts/checksyscalls.sh
  CHK include/generated/compile.h
  AS arch/arm64/mm/proc.o
/tmp/ccl0e21n.s: Assembler messages:
/tmp/ccl0e21n.s: Error: unaligned opcodes detected in executable segment
make[1]: *** [arch/arm64/mm/proc.o] Error 1
make: *** [arch/arm64/mm] Error 2

I'm using gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux toolchain. The kernel can be built successfully with 'CONFIG_DEBUG_INFO is not set'.
I followed the guide provided here,

http://releases.linaro.org/latest/openembedded/aarch64/

Is there a fix for this issue? Thanks.

Fathi Boudra (fboudra) on 2013-12-05
affects: linaro-oe → linaro-linux-baseline
Changed in linaro-linux-baseline:
assignee: nobody → Andrey Konovalov (andrey-konovalov)
Christopher Covington (cov-k) wrote :

This bug also appears to affect binary toolchain releases 2013.11 and 2013.12, but not 2013.09-1.

Changed in linaro-toolchain-binaries:
assignee: nobody → Yvan Roux (yvan-roux)
Yvan Roux (yvan-roux) wrote :

Hi Christopher,

I've no build issue with the 4.8-2013.12 gcc release, git ll_20131213.0 linaro kernel branch and modifying the config like that :

CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set

do you have something else to help me reproduce it ?

Christopher Covington (cov-k) wrote :

This reproduces it for me:

git remote add linus git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
git fetch linus
git checkout v3.11
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image

I noticed that a 3.13 release candidate compiled fine and narrowed down the issue to the absence of this patch in 3.11:

commit f3a1d7d53dccf51959aec16b574617cc6bfeca09
Author: Catalin Marinas <email address hidden>
Date: Mon Sep 2 16:33:54 2013 +0100

    arm64: Remove unused cpu_name ascii in arch/arm64/mm/proc.S

    This string has been moved to arch/arm64/kernel/cputable.c.

Fathi Boudra (fboudra) on 2014-01-13
Changed in linaro-linux-baseline:
milestone: none → 14.01
status: New → Fix Released
Yvan Roux (yvan-roux) wrote :

Thanks Christopher for the information, I managed to reproduce it and indeed Catalin's patch solves the issues as it removes the .align directive (which as it align the code on 2 bytes whereas instruction must be word aligned).

Changed in linaro-toolchain-binaries:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers