[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [BUG] 4.13.0 kernel build error on Alpha

Yesterday, I thought what I wanted to do was the ".c" file equivalent of
the '.section .alphalib,"ax"' substitution we made to the ".S" files.
I'm getting a good kernel build with the following patch:

====--CUT HERE--====
--- linux/arch/alpha/lib/memcpy.c.orig	2016-10-20 01:11:37.000000000 -0500
+++ linux/arch/alpha/lib/memcpy.c	2017-09-11 22:38:41.634495379 -0500
@@ -149,7 +149,7 @@
-void * memcpy(void * dest, const void *src, size_t n)
+__attribute__((section(".alphalib"))) void * memcpy(void * dest, const void *src, size_t n)
 	if (!(((unsigned long) dest ^ (unsigned long) src) & 7)) {
 		__memcpy_aligned_up ((unsigned long) dest, (unsigned long) src,
====--TUC EREH--====

The GNU C documentation concerning the "section" attribute as applied to
functions implies I should have been able to specify
but the compiler didn't like the comma and argument following the
section name.

I'm guessing I'll probably end up having to do this same fixup for the
rest of the ".c" files in the "arch/alpha/lib" directory at some point,
but I'll cross that bridge when I come to it.


Reply to: