[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/21183] New: ARM: allow relative symbol references in PC re
From: |
ard.biesheuvel at linaro dot org |
Subject: |
[Bug binutils/21183] New: ARM: allow relative symbol references in PC relative ldr literals |
Date: |
Sun, 19 Feb 2017 15:40:08 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=21183
Bug ID: 21183
Summary: ARM: allow relative symbol references in PC relative
ldr literals
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: ard.biesheuvel at linaro dot org
Target Milestone: ---
One thing that would be particularly useful in position independent bare metal
code that needs to be portable across older ARM versions and even OABI code
(such as the Linux kernel) is the ability to emit relative symbol references
via ldr.
For examples, this code is currently rejected by GAS:
ldr \reg, =\sym - (8887f + 8)
8887: ldr \reg, [pc, \reg]
but can be open coded in the following way:
ldr \reg, 8888f
8887: ldr \reg, [pc, \reg]
b 8889f
8888: .long \sym - (8887b + 8)
8889:
but this requires an additional branch to jump over the explicit literal.
Since this is not a limitation of the ISA, but of the assembler, please
consider adding support for this.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/21183] New: ARM: allow relative symbol references in PC relative ldr literals,
ard.biesheuvel at linaro dot org <=