[ion][liba] Add 'noinline' attribute for symbols that have to be in

internal flash (we don't need to consider these symbol dependencies
though)
This commit is contained in:
Émilie Feral
2019-06-19 09:36:38 -04:00
parent 1219b77b52
commit 51284296e7
4 changed files with 5 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ extern "C" {
extern cxx_constructor _init_array_end;
}
void abort() {
void __attribute__((noinline)) abort() {
#if DEBUG
while (1) {
}
@@ -120,6 +120,6 @@ void __attribute__((noinline)) start() {
abort();
}
void __attribute__((interrupt)) isr_systick() {
void __attribute__((interrupt, noinline)) isr_systick() {
Ion::Device::Timing::MillisElapsed++;
}

View File

@@ -1,6 +1,6 @@
#include <assert.h>
#include <stdlib.h>
void __assert(const char * expression, const char * file, int line) {
void __attribute__((noinline)) __assert(const char * expression, const char * file, int line) {
abort();
}

View File

@@ -3,7 +3,7 @@
// Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51205
void * memcpy(void * dst, const void * src, size_t n) __attribute__((externally_visible));
void * memcpy(void * dst, const void * src, size_t n) {
void * __attribute__((noinline)) memcpy(void * dst, const void * src, size_t n) {
char * destination = (char *)dst;
char * source = (char *)src;

View File

@@ -3,7 +3,7 @@
// Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51205
void * memset(void * b, int c, size_t len) __attribute__((externally_visible));
void * memset(void * b, int c, size_t len) {
void * __attribute__((noinline)) memset(void * b, int c, size_t len) {
char * destination = (char *)b;
while (len--) {
*destination++ = (unsigned char)c;