Alpha arch development list
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Michael Cree <mcree@orcon.net.nz>,
	"linux-alpha@vger.kernel.org" <linux-alpha@vger.kernel.org>
Subject: Re: BRSGP relocation truncations in linking kernel for Alpha.
Date: Mon, 24 Oct 2016 22:59:02 +0200	[thread overview]
Message-ID: <580E7616.2020806@gmx.de> (raw)
In-Reply-To: <20161022024044.vbfxx4o2rrkwc7gy@tower>

Hi Michael,

On 22.10.2016 04:41, Michael Cree wrote:
> When building recent kernels for Alpha I am getting the following
> relocation errors:
> 
> alpha-linux-gnu-ld -static -N --build-id -o .tmp_vmlinux1 -T
> ./arch/alpha/kernel/vmlinux.lds arch/alpha/kernel/head.o init/built-in.o
> --start-group usr/built-in.o arch/alpha/kernel/built-in.o
> arch/alpha/mm/built-in.o arch/alpha/math-emu/built-in.o
> kernel/built-in.o certs/built-in.o mm/built-in.o fs/built-in.o
> ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o
> lib/lib.a arch/alpha/lib/lib.a lib/built-in.o arch/alpha/lib/built-in.o
> drivers/built-in.o sound/built-in.o firmware/built-in.o net/built-in.o
> virt/built-in.o --end-group
> net/built-in.o: In function `packet_setsockopt':
> net/packet/af_packet.o:(.text+0xf71d0): relocation truncated to fit:
> BRSGP against symbol `__copy_user' defined in .text section in
> arch/alpha/lib/lib.a(ev6-copy_user.o)
> 
> I can solve it by de-selecting config items, but it is getting
> frustrating that I can't build the kernel I would like to build.
> 
> Is there anything we can do to resolve these relocations?

You could try to play around where various functions get located
in the final vmlinux file. For that you need to modify 
arch/alpha/kernel/vmlinux.lds.S.
I did quite such optimizations for parisc like that.

Does it only happens for __copy_user() ?
If yes, I assume the problem happens because of __copy_tofrom_user_nocheck() in 
uaccess.h is always inlined. Maybe un-inlining helps?
Or, the inline-assembly for jsr/bsr needs tweeking ?

Helge 

  reply	other threads:[~2016-10-24 20:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-22  2:41 BRSGP relocation truncations in linking kernel for Alpha Michael Cree
2016-10-24 20:59 ` Helge Deller [this message]
2016-10-25  3:13   ` Richard Henderson
2016-10-25  8:26     ` Michael Cree
2016-10-25 16:58       ` Richard Henderson
2016-10-25 18:07       ` Richard Henderson
2016-10-26  6:56         ` Michael Cree
2016-10-26 15:18           ` Richard Henderson
2017-02-09  9:58       ` Alpha Kernel Regression [was Re: BRSGP relocation truncations in linking kernel for Alpha.] Michael Cree
2016-10-25 20:01     ` BRSGP relocation truncations in linking kernel for Alpha Thorsten Kranzkowski

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=580E7616.2020806@gmx.de \
    --to=deller@gmx.de \
    --cc=linux-alpha@vger.kernel.org \
    --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