LKML Archive on
help / color / mirror / Atom feed
From: Ard Biesheuvel <>
To: Russell King - ARM Linux <>
	"Jason A. Donenfeld" <>,,
	"" <>,
	LKML <>
Subject: Re: Fwd: [PATCH] arm: ensure symbol is a thumb symbol in new binutils
Date: Thu, 23 Nov 2017 14:26:09 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 23 November 2017 at 14:02, Russell King - ARM Linux
<> wrote:
> On Thu, Nov 23, 2017 at 11:47:56AM +0100, Jason A. Donenfeld wrote:
>> Hello Nick & Binutils developers,
>> It would appear that recent changes in the binutils assembler (perhaps
>> 52a86f843b6dee1de9977293da9786649b146b05? perhaps not?) have broken
>> the kernel when compiled in thumb2 mode. We currently do not have a
>> way of working around your breaking changes without adding additional
>> runtime instructions, which isn't acceptable for us. Details are
>> included in the thread below.
> Hi Nick,
> I have to ask why it was thought a good idea to change the behaviour
> of the assembler's "adr" pseudo-instruction after it's had the existing
> behaviour for such a long time.

I think part of the confusion comes from the fact that ADR is no
longer a pseudo-instruction on Thumb2, and can be used to create
cross-section symbol references that are fixed up by the linker (using
a dedicated relocation type)

So before the change, we were in the situation where ADR behaved
differently when used on symbols, depending on whether they were
defined in the same section or not:
- cross section symbol references are fixed up by the linker, and do
take the Thumb bit into account for function symbols,
- local symbol references and label references are not fixed up at
all, regardless of their type annotation.

Note that external symbol references are hardly ever used, given that
they don't work in ARM mode (since it is a pseudo op there), so in the
kernel, we only care about local symbol references and label

After the change, internal symbol references behave differently, but
label references behave the same. So the uniform behavior we care
about and rely on is no longer there, and even worse, we cannot deal
with this in the code because we cannot detect which binutils version
we are using without intrusive workarounds)


      reply	other threads:[~2017-11-23 14:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
     [not found] ` <>
     [not found]   ` <>
     [not found]     ` <>
     [not found]       ` <>
     [not found]         ` <>
2017-11-23 10:47           ` Fwd: [PATCH] arm: ensure symbol is a thumb symbol in new binutils Jason A. Donenfeld
2017-11-23 11:48             ` [PATCH] arm: detect buggy binutils when in thumb2 mode Jason A. Donenfeld
2017-11-23 11:50               ` [PATCH v2] " Jason A. Donenfeld
2017-11-23 12:01                 ` Martin Storsjö
2017-11-23 14:02             ` Fwd: [PATCH] arm: ensure symbol is a thumb symbol in new binutils Russell King - ARM Linux
2017-11-23 14:26               ` Ard Biesheuvel [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:

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

  git send-email \ \ \ \ \ \ \ \ \ \

* 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).