-
Notifications
You must be signed in to change notification settings - Fork 408
Description
When compiling the kernel for the Odroid-XU3 on branch 3.10.y if you have the right configuration you will run into this while trying link the binary:
LD arch/arm/mach-exynos/built-in.o
arch/arm/mach-exynos/secmem.o: In function exynos_ion_sync_for_device': secmem.c:(.text+0xd4): multiple definition of
exynos_ion_sync_for_device'
arch/arm/mach-exynos/mach-odroid-xu3.o:mach-odroid-xu3.c:(.text+0x0): first defined here
arch/arm/mach-exynos/secmem.o: In function exynos_ion_sync_for_cpu': secmem.c:(.text+0xec): multiple definition of
exynos_ion_sync_for_cpu'
arch/arm/mach-exynos/mach-odroid-xu3.o:mach-odroid-xu3.c:(.text+0x18): first defined here
scripts/Makefile.build:387: recipe for target 'arch/arm/mach-exynos/built-in.o' failed
make[1]: *** [arch/arm/mach-exynos/built-in.o] Error 1
Makefile:797: recipe for target 'arch/arm/mach-exynos' failed
A simple fix would be give a static context to the functions at https://github.com/hardkernel/linux/blob/odroidxu3-3.10.y/include/linux/exynos_ion.h#L131
The error occurs because both .c files bring in the exynos_ion.h header file and the void functions are declared globally. So making them static shouldn't be an issue when it comes to symbol resolution by the linker. I've tested this fix myself and can confirm it builds properly as it should.