aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sam3x
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-07-31 10:52:56 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-08-06 23:36:05 -0400
commit8572cae9a0fea745477b9464115c472651d64eb6 (patch)
tree9cccb238fadce62b79019d7af08ec221f23078c9 /lib/sam3x
parentdd240f64718fb9fb55f52caea0f52e4b2de064f1 (diff)
downloadkutter-8572cae9a0fea745477b9464115c472651d64eb6.tar.gz
kutter-8572cae9a0fea745477b9464115c472651d64eb6.tar.xz
kutter-8572cae9a0fea745477b9464115c472651d64eb6.zip
lib: Modify SAM3X CMSIS files to work with GCC's lto feature
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'lib/sam3x')
-rw-r--r--lib/sam3x/gcc/gcc/startup_sam3xa.c2
-rw-r--r--lib/sam3x/sam3x.patch13
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/sam3x/gcc/gcc/startup_sam3xa.c b/lib/sam3x/gcc/gcc/startup_sam3xa.c
index 337a6d3c..dcf56447 100644
--- a/lib/sam3x/gcc/gcc/startup_sam3xa.c
+++ b/lib/sam3x/gcc/gcc/startup_sam3xa.c
@@ -132,7 +132,7 @@ void CAN0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void CAN1_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/sam3x/sam3x.patch b/lib/sam3x/sam3x.patch
new file mode 100644
index 00000000..b48826b8
--- /dev/null
+++ b/lib/sam3x/sam3x.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/sam3x/gcc/gcc/startup_sam3xa.c b/lib/sam3x/gcc/gcc/startup_sam3xa.c
+index 337a6d3c..dcf56447 100644
+--- a/lib/sam3x/gcc/gcc/startup_sam3xa.c
++++ b/lib/sam3x/gcc/gcc/startup_sam3xa.c
+@@ -132,7 +132,7 @@ void CAN0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
+ void CAN1_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 */