aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2018-11-22 12:35:17 +0100
committerAyke van Laethem <[email protected]>2018-11-22 12:35:17 +0100
commit4a8ced590b724ef2d3d1a9d58df2b0d795391027 (patch)
tree5be26e6868bf2348c33847f44546ea4b1ad15b14 /tools
parentd887d645f763aa39e6f31382a11eb53b6beb9c36 (diff)
downloadtinygo-4a8ced590b724ef2d3d1a9d58df2b0d795391027.tar.gz
tinygo-4a8ced590b724ef2d3d1a9d58df2b0d795391027.zip
tools/gen-device-svd: generate .s files compatible with lld
The llvm linker expects some flags to line up in input sections mapped to a particular output section, which the GNU linker ignored. Make sure this flag is set in the input section, see: https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gen-device-svd.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/gen-device-svd.py b/tools/gen-device-svd.py
index 0fd1ecf47..f823d3400 100755
--- a/tools/gen-device-svd.py
+++ b/tools/gen-device-svd.py
@@ -385,7 +385,10 @@ Default_Handler:
.set \\handler, Default_Handler
.endm
-.section .isr_vector
+// Must set the "a" flag on the section:
+// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049
+// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version
+.section .isr_vector, "a", %progbits
.global __isr_vector
// Interrupt vector as defined by Cortex-M, starting with the stack top.
// On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading