aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-12-26 20:58:07 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-01-07 19:34:07 -0500
commit519f2cff4123b8cd8e18ca5342e1bf8c4d01cd5a (patch)
tree092b17c4698fec549511b518495ce2afef7577fb /lib
parent6db21d3033b85127226e6ad1da50676660843be4 (diff)
downloadkutter-519f2cff4123b8cd8e18ca5342e1bf8c4d01cd5a.tar.gz
kutter-519f2cff4123b8cd8e18ca5342e1bf8c4d01cd5a.tar.xz
kutter-519f2cff4123b8cd8e18ca5342e1bf8c4d01cd5a.zip
lib: Update sam4s code so that it works with gcc's -flto feature
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/README3
-rw-r--r--lib/sam4s/gcc/gcc/startup_sam4s.c2
-rw-r--r--lib/sam4s/sam4s.patch13
3 files changed, 16 insertions, 2 deletions
diff --git a/lib/README b/lib/README
index 79f6e99f..73e905a0 100644
--- a/lib/README
+++ b/lib/README
@@ -23,7 +23,8 @@ run. See cmsis-sam4e8e.patch for the modifications.
The sam4s directory contains code from the
Atmel.SAM4S_DFP.1.0.56.atpack zip file found at:
http://packs.download.atmel.com/
-version 1.0.56 (extracted on 20181220).
+version 1.0.56 (extracted on 20181220). It has been modified to
+compile with gcc's LTO feature. See sam4s.patch for the modifications.
The samd21 directory contains code from the
Atmel.SAMD21_DFP.1.3.304.atpack zip file found at:
diff --git a/lib/sam4s/gcc/gcc/startup_sam4s.c b/lib/sam4s/gcc/gcc/startup_sam4s.c
index 3792319e..ae19328a 100644
--- a/lib/sam4s/gcc/gcc/startup_sam4s.c
+++ b/lib/sam4s/gcc/gcc/startup_sam4s.c
@@ -111,7 +111,7 @@ void ACC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void UDP_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
/* Exception Table */
-__attribute__ ((section(".vectors")))
+__attribute__ ((section(".vectors"))) __attribute__((externally_visible))
const DeviceVectors exception_table = {
/* Configure Initial Stack Pointer, using linker-generated symbols */
diff --git a/lib/sam4s/sam4s.patch b/lib/sam4s/sam4s.patch
new file mode 100644
index 00000000..e486dae1
--- /dev/null
+++ b/lib/sam4s/sam4s.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/sam4s/gcc/gcc/startup_sam4s.c b/lib/sam4s/gcc/gcc/startup_sam4s.c
+index 3792319e..ae19328a 100644
+--- a/lib/sam4s/gcc/gcc/startup_sam4s.c
++++ b/lib/sam4s/gcc/gcc/startup_sam4s.c
+@@ -111,7 +111,7 @@ void ACC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
+ void UDP_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
+
+ /* Exception Table */
+-__attribute__ ((section(".vectors")))
++__attribute__ ((section(".vectors"))) __attribute__((externally_visible))
+ const DeviceVectors exception_table = {
+
+ /* Configure Initial Stack Pointer, using linker-generated symbols */