Alpha arch development list
 help / color / mirror / Atom feed
From: Bob Tracy <rct@gherkin.frus.com>
To: Michael Cree <mcree@orcon.net.nz>,
	Matt Turner <mattst88@gmail.com>,
	Debian Alpha Mailing List <debian-alpha@lists.debian.org>,
	linux-alpha <linux-alpha@vger.kernel.org>,
	Helge Deller <deller@gmx.de>,
	"Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [BUG] 4.13.0 kernel build error on Alpha
Date: Mon, 11 Sep 2017 23:06:36 -0500	[thread overview]
Message-ID: <20170912040636.GA31670@gherkin.frus.com> (raw)
In-Reply-To: <20170911060230.mrkdgsw4gs3zf76z@tower>

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

      reply	other threads:[~2017-09-12  4:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-10 22:34 [BUG] 4.13.0 kernel build error on Alpha Bob Tracy
2017-09-11  2:59 ` Matt Turner
2017-09-11  3:16   ` Bob Tracy
2017-09-11  3:23     ` Bob Tracy
2017-09-11  6:02       ` Michael Cree
2017-09-12  4:06         ` Bob Tracy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170912040636.GA31670@gherkin.frus.com \
    --to=rct@gherkin.frus.com \
    --cc=debian-alpha@lists.debian.org \
    --cc=deller@gmx.de \
    --cc=linux-alpha@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=mattst88@gmail.com \
    --cc=mcree@orcon.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox