Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit 9e6ee34

Browse files
bors[bot]japaric
andauthored
Merge #295
295: [backport] add CFI and size info to external assembly r=therealprof a=japaric backport of #294 Co-authored-by: Jorge Aparicio <[email protected]>
2 parents 2907763 + b785bce commit 9e6ee34

9 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- (ARMv6-M) Set LR value to a known value on reset (as the ARM spec requires)
13+
- Added CFI and size info to external assembly subroutines (`HardFaultTrampoline`)
14+
1015
## [v0.6.12] - 2020-01-26
1116

1217
### Fixed

asm.s

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
.cfi_sections .debug_frame
2+
13
# LLD requires that the section flags are explicitly set here
24
.section .HardFaultTrampoline, "ax"
35
.global HardFaultTrampoline
46
# .type and .thumb_func are both required; otherwise its Thumb bit does not
57
# get set and an invalid vector table is generated
68
.type HardFaultTrampoline,%function
79
.thumb_func
10+
.cfi_startproc
811
HardFaultTrampoline:
912
# depending on the stack mode in EXC_RETURN, fetch stack pointer from
1013
# PSP or MSP
@@ -17,6 +20,8 @@ HardFaultTrampoline:
1720
0:
1821
mrs r0, PSP
1922
b HardFault
23+
.cfi_endproc
24+
.size HardFaultTrampoline, . - HardFaultTrampoline
2025

2126
# ARMv6-M leaves LR in an unknown state on Reset
2227
# this trampoline sets LR before it's pushed onto the stack by Reset
@@ -26,8 +31,11 @@ HardFaultTrampoline:
2631
# get set and an invalid vector table is generated
2732
.type PreResetTrampoline,%function
2833
.thumb_func
34+
.cfi_startproc
2935
PreResetTrampoline:
3036
# set LR to the initial value used by the ARMv7-M (0xFFFF_FFFF)
3137
ldr r0,=0xffffffff
3238
mov lr,r0
3339
b Reset
40+
.cfi_endproc
41+
.size PreResetTrampoline, . - PreResetTrampoline

bin/thumbv6m-none-eabi.a

192 Bytes
Binary file not shown.

bin/thumbv7em-none-eabi.a

192 Bytes
Binary file not shown.

bin/thumbv7em-none-eabihf.a

192 Bytes
Binary file not shown.

bin/thumbv7m-none-eabi.a

192 Bytes
Binary file not shown.

bin/thumbv8m.base-none-eabi.a

192 Bytes
Binary file not shown.

bin/thumbv8m.main-none-eabi.a

192 Bytes
Binary file not shown.

bin/thumbv8m.main-none-eabihf.a

192 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)