vmlinux is not an object file

Bug #1191970 reported by cfriedt on 2013-06-17
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-ti-omap4 (Ubuntu)
Undecided
Unassigned

Bug Description

On Mac OS X, building the source for version linux-ti-omap4 3.2.0-1433.44, results in the following error:

$ make ARCH=arm CROSS_COMPILE=armv7a-softfloat-linux-gnueabi- LOADADDR=0x80000000 uImage
  CHK include/linux/version.h
  CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL scripts/checksyscalls.sh
  CHK include/generated/compile.h
  CHK kernel/config_data.h
  Kernel: arch/arm/boot/Image is ready
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
  LD arch/arm/boot/compressed/vmlinux
arch/arm/boot/compressed/vmlinux.lds:77: undefined symbol `__OBJC' referenced in expression
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [uImage] Error 2

This is due to modification of the file "arch/arm/boot/compressed/Makefile" from the upstream kernel.org file of the same name.

The problem is fixed by a 1-line revert in the makefile (see below).

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 21f56ff..efb0172 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -126,7 +126,7 @@ ccflags-y := -fpic -fno-builtin -I$(obj)
 asflags-y := -Wa,-march=all

 # Supply kernel BSS size to the decompressor via a linker symbol.
-KBSS_SZ = $(shell size $(obj)/../../../../vmlinux | awk 'END{print $$3}')
+KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | awk 'END{print $$3}')
 LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
 # Supply ZRELADDR to the decompressor via a linker symbol.
 ifneq ($(CONFIG_AUTO_ZRELADDR),y)

cfriedt (chrisfriedt) wrote :
tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers