Thread (6 messages) 6 messages, 3 authors, 2017-09-12

Re: [BUG] 4.13.0 kernel build error on Alpha

From: Bob Tracy <hidden>
Date: 2017-09-12 04:06:36

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 @@
 	DO_REST_ALIGNED_DN(d,s,n);
 }
 
-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
	__attribute__((section(".alphalib,\"ax\"")))
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.

--Bob
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help