linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: Tony Breeds <tony@bakeyournoodle.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	LinuxPPC-dev <linuxppc-dev@lists.ozlabs.org>,
	Alan Modra <amodra@gmail.com>
Subject: Re: [PATCH] powerpc/le: Avoid creatng R_PPC64_TOCSAVE relocations for modules.
Date: Mon, 7 Apr 2014 09:55:11 +1000	[thread overview]
Message-ID: <20140407095511.7677da8b@kryten> (raw)
In-Reply-To: <20140312041201.GA13555@thor.bakeyournoodle.com>


Hi Tony,

> When building modules with a native le toolchain the linker will
> generate R_PPC64_TOCSAVE relocations when it's safe to omit saving r2
> on a plt call.  This isn't helpful in the conext of a kernel module
> and the kernel will fail to load those modules with an error like:
> 	nf_conntrack: Unknown ADD relocation: 109
> 
> This patch tells the linker to avoid createing R_PPC64_TOCSAVE
> relocations allowing modules to load.

Looks good.

Signed-off-by: Anton Blanchard <anton@samba.org>

> +ifeq ($(call cc-option-yn,-mno-save-toc-indirect),y)
> +       KBUILD_CFLAGS_MODULE += -mno-save-toc-indirect
> +endif

Low priority bikeshedding, but could we save ourselves a few lines with:

KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-save-toc-indirect)

Anton

      reply	other threads:[~2014-04-06 23:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12  4:12 [PATCH] powerpc/le: Avoid creatng R_PPC64_TOCSAVE relocations for modules Tony Breeds
2014-04-06 23:55 ` Anton Blanchard [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=20140407095511.7677da8b@kryten \
    --to=anton@samba.org \
    --cc=amodra@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tony@bakeyournoodle.com \
    /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;
as well as URLs for NNTP newsgroup(s).