From 1a1a87a948717ce9646c4b3861c55b0dbb20bc98 Mon Sep 17 00:00:00 2001 From: dimok789 Date: Sun, 6 Nov 2016 21:10:42 -0800 Subject: [PATCH] - keep .lib.rplLibs section. this allows use of --gc-sections and reduce RPX size - added a few memory functions --- include/coreinit/cache.h | 3 +++ include/coreinit/memory.h | 10 ++++++++++ rpl/libcoreinit/exports.h | 3 +++ rules/rpl.ld | 1 + 4 files changed, 17 insertions(+) diff --git a/include/coreinit/cache.h b/include/coreinit/cache.h index d164744..296bc44 100644 --- a/include/coreinit/cache.h +++ b/include/coreinit/cache.h @@ -74,6 +74,9 @@ DCTouchRange(void *addr, uint32_t size); +/** + * Equivalent to icbi instruction. + */ void ICInvalidateRange(void *addr, uint32_t size); diff --git a/include/coreinit/memory.h b/include/coreinit/memory.h index fc60f22..3efc92c 100644 --- a/include/coreinit/memory.h +++ b/include/coreinit/memory.h @@ -23,6 +23,16 @@ OSBlockSet(void *dst, uint8_t val, uint32_t size); +uint32_t +OSEffectiveToPhysical(void *vaddr); + +void* +OSAllocFromSystem(uint32_t size, + int align); + +void +OSFreeToSystem(void *ptr); + #ifdef __cplusplus } #endif diff --git a/rpl/libcoreinit/exports.h b/rpl/libcoreinit/exports.h index 68529ad..7a4229c 100644 --- a/rpl/libcoreinit/exports.h +++ b/rpl/libcoreinit/exports.h @@ -237,6 +237,9 @@ EXPORT(MEMGetNthListObject); // coreinit/memory.h EXPORT(OSBlockMove); EXPORT(OSBlockSet); +EXPORT(OSEffectiveToPhysical); +EXPORT(OSAllocFromSystem); +EXPORT(OSFreeToSystem); // coreinit/messagequeue.h EXPORT(OSInitMessageQueue); diff --git a/rules/rpl.ld b/rules/rpl.ld index 157e6bc..e0681df 100644 --- a/rules/rpl.ld +++ b/rules/rpl.ld @@ -180,6 +180,7 @@ SECTIONS { */ .lib.rplLibs ALIGN(32) : { *(.lib.rplLibs) + KEEP (*(.lib.rplLibs*)) } /*