1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-15 19:22:45 +03:00

Modify the linker script to move some code into flash, enable -mtext-section-literals

This commit is contained in:
Ivan Grokhotkov
2014-12-02 00:46:57 +03:00
parent 03f35e44f0
commit 2d9c5d8297
12 changed files with 33 additions and 79 deletions

View File

@@ -17,19 +17,39 @@
*/
#include <stdlib.h>
extern "C" {
#include "ets_sys.h"
#include "os_type.h"
#include "osapi.h"
#include "mem.h"
#include "user_interface.h"
}
void *operator new(size_t size) {
return os_malloc(size);
}
void *operator new[](size_t size) {
return os_malloc(size);
}
void operator delete(void * ptr) {
os_free(ptr);
}
void operator delete[](void * ptr) {
os_free(ptr);
}
extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__));
extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__));
void __cxa_pure_virtual(void) {
// We might want to write some diagnostics to uart in this case
//std::terminate();
abort();
}
void __cxa_deleted_virtual(void) {
// We might want to write some diagnostics to uart in this case
//std::terminate();
abort();
}