From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Charles Steinkuehler <charles@steinkuehler.net>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] ARM/BeagleBone Thumb2 Kernels
Date: Fri, 24 Jan 2014 11:52:25 +0100 [thread overview]
Message-ID: <52E245E9.6080301@xenomai.org> (raw)
In-Reply-To: <52E1D646.8050907@steinkuehler.net>
On 01/24/2014 03:56 AM, Charles Steinkuehler wrote:
> So when I try to build a Xenomai patched kernel for the BeagleBone using
> Thumb2 instructions, I get the following linker errors:
>
>> LD init/built-in.o
>> arch/arm/kernel/built-in.o: In function `__irq_usr':
>> :(.kprobes.text+0x3c2): relocation truncated to fit: R_ARM_THM_JUMP19
>> against symbol `__ipipe_ret_to_user_irqs_disabled' defined in .text
>> section in arch/arm/kernel/built-in.o
>> arch/arm/kernel/built-in.o: In function `ret_from_exception':
>> :(.kprobes.text+0x600): relocation truncated to fit: R_ARM_THM_JUMP19
>> against symbol `__ipipe_ret_to_user_irqs_disabled' defined in .text
>> section in arch/arm/kernel/built-in.o
>> make: *** [vmlinux] Error 1
>>
>> The link error goes away if I disable CONFIG_THUMB2_KERNEL, which wasn't
>> set in the original kernel config.
>
> This has recently become more of a problem, as the default BeagleBone
> kernel has switched to enabling CONFIG_THUMB2_KERNEL.
>
> A bit of Googling turned up the following patch to fix a similar problem
> on the Tegra (not Xenomai related):
>
> http://patchwork.ozlabs.org/patch/236760/
>
> I applied a similar if-then patch (see below) to the two Xenomai calls
> that generate the linker errors, and the result is a working kernel.
>
> Can someone more familiar with iPipeand ARM assembly review the attached
> minor patch and advise on whether or not it seems OK?
>
> As I understand things, the two bne calls in the default ipipe patch
> don't work when building a kernel using the thumb instructions due to
> the limited range of the conditional branch. Using the if-then
> construct when THUMB2 is enabled allows for a larger addressing range in
> the branch, thus avoiding the linker errors. If this seems OK, perhaps
> it should be applied to the master ipipe patch set? If not, is there a
> better way to avoid the linker errors when building with the thumb
> instructions?
This looks fine, but I have one objection: why does it work for me with
the toolchain I use (linaro 2012.09)?
--
Gilles.
next prev parent reply other threads:[~2014-01-24 10:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 2:56 [Xenomai] ARM/BeagleBone Thumb2 Kernels Charles Steinkuehler
2014-01-24 10:52 ` Gilles Chanteperdrix [this message]
2014-01-24 11:22 ` Gilles Chanteperdrix
2014-01-24 11:38 ` Charles Steinkuehler
2014-01-24 12:18 ` Gilles Chanteperdrix
2014-01-24 11:53 ` Charles Steinkuehler
2014-01-24 12:28 ` Gilles Chanteperdrix
2014-01-25 18:14 ` Gilles Chanteperdrix
2014-01-25 17:48 ` Charles Steinkuehler
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=52E245E9.6080301@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=charles@steinkuehler.net \
--cc=xenomai@xenomai.org \
/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.