diff options
author | David Guillen Fandos | 2021-03-05 01:14:31 +0100 |
---|---|---|
committer | David Guillen Fandos | 2021-03-05 01:14:31 +0100 |
commit | 89bd699837ed5519b19c5ff7a0bc6fd892de416d (patch) | |
tree | e0eebb5d85e911d0eb76783ff3adcb85877333c4 | |
parent | 6770e0a5e7ce39abd6f0914fb74a52fc04974422 (diff) | |
download | picogpsp-89bd699837ed5519b19c5ff7a0bc6fd892de416d.tar.gz picogpsp-89bd699837ed5519b19c5ff7a0bc6fd892de416d.tar.bz2 picogpsp-89bd699837ed5519b19c5ff7a0bc6fd892de416d.zip |
Reduce executable size by 90%
Turns out most of that file ends up in JIT section, which is RWX and not
a very nice way to run code really (security issues aside).
This also makes possible to build that file with -ggdb otherwise it
complains about stuff.
-rw-r--r-- | cpu_threaded.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpu_threaded.c b/cpu_threaded.c index 083c027..c7b8850 100644 --- a/cpu_threaded.c +++ b/cpu_threaded.c @@ -54,7 +54,7 @@ u8 *rom_translation_ptr = rom_translation_cache; u8 *ram_translation_ptr = ram_translation_cache; u8 *bios_translation_ptr = bios_translation_cache; #elif defined(ARM_MEMORY_DYNAREC) -__asm__(".section .jit,\"awx\",%progbits"); +__asm__(".section .jit,\"awx\",%nobits"); u8 rom_translation_cache[ROM_TRANSLATION_CACHE_SIZE] __attribute__ ((aligned(4),section(".jit"))); @@ -67,6 +67,8 @@ u8 *ram_translation_ptr = ram_translation_cache; u8 bios_translation_cache[BIOS_TRANSLATION_CACHE_SIZE] __attribute__ ((aligned(4),section(".jit"))); u8 *bios_translation_ptr = bios_translation_cache; + +__asm__(".section .text"); #else u8 rom_translation_cache[ROM_TRANSLATION_CACHE_SIZE]; u8 ram_translation_cache[RAM_TRANSLATION_CACHE_SIZE]; |