[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/29349] New: ADR instructions generate wrong offsets in Thumb co
From: |
Mr.Bossman075 at gmail dot com |
Subject: |
[Bug gas/29349] New: ADR instructions generate wrong offsets in Thumb code for armv7-m |
Date: |
Sun, 10 Jul 2022 05:40:50 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29349
Bug ID: 29349
Summary: ADR instructions generate wrong offsets in Thumb code
for armv7-m
Product: binutils
Version: 2.37
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: Mr.Bossman075 at gmail dot com
Target Milestone: ---
In U-Boot after this commit, armv7-m fails to boot because of this commit.
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d3e52e120b68bf19552743fbc078e0a759f48cb7
The bug is demonstrated below in a cleaner format:
```
.syntax unified
.global bug;
.align 4
bugs:
adr r3, bugs
.size bugs, .-bugs
.type bugs 2; // This changes offset from 4 to 3 in
include/linux/linkage.h:ENDPROC
//arm-linux-gnueabi-as -march=armv7-m -c -o bug.o bug.S &&
arm-linux-gnueabi-objdump --disassemble=bug bug.o
```
what is more confusing is
https://sourceware.org/binutils/docs/as/ARM-Opcodes.html conflicts with the arm
docs about the ADR instruction giving a multiple of 4 on thumb.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/29349] New: ADR instructions generate wrong offsets in Thumb code for armv7-m,
Mr.Bossman075 at gmail dot com <=
- [Bug gas/29349] ADR instructions generate wrong offsets in Thumb code for armv7-m, Mr.Bossman075 at gmail dot com, 2022/07/10
- [Bug gas/29349] ADR instructions generate wrong offsets in Thumb code for armv7-m, Mr.Bossman075 at gmail dot com, 2022/07/10
- [Bug gas/29349] ADR instructions generate wrong offsets in Thumb code for armv7-m, Mr.Bossman075 at gmail dot com, 2022/07/10
- [Bug gas/29349] ADR instructions generate wrong offsets in Thumb code for armv7-m, Mr.Bossman075 at gmail dot com, 2022/07/10
- [Bug gas/29349] ADR instructions generate wrong offsets in Thumb code for armv7-m, tnfchris at sourceware dot org, 2022/07/11
- [Bug gas/29349] ADR instructions generate wrong offsets in Thumb code for armv7-m, Mr.Bossman075 at gmail dot com, 2022/07/11
- [Bug gas/29349] ADR instructions generate wrong offsets in Thumb code for armv7-m, tnfchris at sourceware dot org, 2022/07/11
- [Bug gas/29349] ADR instructions generate wrong offsets in Thumb code for armv7-m, Mr.Bossman075 at gmail dot com, 2022/07/11