From: Tony Lindgren <tony@atomide.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>,
Ben Hutchings <ben@decadent.org.uk>,
Anders Kaseorg <andersk@ksplice.com>,
Greg KH <gregkh@linuxfoundation.org>,
Russell King <rmk+kernel@arm.linux.org.uk>
Subject: [PATCH] modpost: Fix section warnings for ARM for many compilers
Date: Mon, 13 Feb 2012 13:24:01 -0800 [thread overview]
Message-ID: <20120213212401.GH1426@atomide.com> (raw)
It turns out that many compilers don't show section warnings on ARM
currently because handling for ARM_CALL relocs are missing from
modpost.c.
Based on commit c2e26114 ([ARM] 3205/1: Handle new EABI relocations when
loading kernel modules) it seems that R_ARM_PC24, R_ARM_CALL and
R_ARM_JUMP24 can be handled the same way.
As modpost.c includes elf.h, we need to also consider that at least
Debian libc6-dev is missing defines for both R_ARM_CALL and R_ARM_JUMP24
in /usr/include/elf.h.
So for now let's just use the numbers in modpost.c.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Anders Kaseorg <andersk@ksplice.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
Anybody got better ideas for dealing with the missing elf.h
defines?
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1505,6 +1505,8 @@ static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
(elf->symtab_start + ELF_R_SYM(r->r_info));
break;
case R_ARM_PC24:
+ case 28: /* R_ARM_CALL */
+ case 29: /* R_ARM_JUMP24 */
/* From ARM ABI: ((S + A) | T) - P */
r->r_addend = (int)(long)(elf->hdr +
sechdr->sh_offset +
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] modpost: Fix section warnings for ARM for many compilers
Date: Mon, 13 Feb 2012 13:24:01 -0800 [thread overview]
Message-ID: <20120213212401.GH1426@atomide.com> (raw)
It turns out that many compilers don't show section warnings on ARM
currently because handling for ARM_CALL relocs are missing from
modpost.c.
Based on commit c2e26114 ([ARM] 3205/1: Handle new EABI relocations when
loading kernel modules) it seems that R_ARM_PC24, R_ARM_CALL and
R_ARM_JUMP24 can be handled the same way.
As modpost.c includes elf.h, we need to also consider that at least
Debian libc6-dev is missing defines for both R_ARM_CALL and R_ARM_JUMP24
in /usr/include/elf.h.
So for now let's just use the numbers in modpost.c.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Anders Kaseorg <andersk@ksplice.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
Anybody got better ideas for dealing with the missing elf.h
defines?
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1505,6 +1505,8 @@ static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
(elf->symtab_start + ELF_R_SYM(r->r_info));
break;
case R_ARM_PC24:
+ case 28: /* R_ARM_CALL */
+ case 29: /* R_ARM_JUMP24 */
/* From ARM ABI: ((S + A) | T) - P */
r->r_addend = (int)(long)(elf->hdr +
sechdr->sh_offset +
next reply other threads:[~2012-02-13 21:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 21:24 Tony Lindgren [this message]
2012-02-13 21:24 ` [PATCH] modpost: Fix section warnings for ARM for many compilers Tony Lindgren
2012-02-13 22:26 ` Uwe Kleine-König
2012-02-13 22:26 ` Uwe Kleine-König
2012-02-13 22:51 ` Russell King - ARM Linux
2012-02-13 22:51 ` Russell King - ARM Linux
2012-02-13 22:51 ` Russell King - ARM Linux
2012-02-14 0:29 ` Rusty Russell
2012-02-14 0:29 ` Rusty Russell
2012-02-14 1:12 ` Tony Lindgren
2012-02-14 1:12 ` Tony Lindgren
2012-02-14 21:01 ` Tony Lindgren
2012-02-14 21:01 ` Tony Lindgren
2012-02-14 21:01 ` Tony Lindgren
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=20120213212401.GH1426@atomide.com \
--to=tony@atomide.com \
--cc=andersk@ksplice.com \
--cc=ben@decadent.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=rusty@rustcorp.com.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.