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.
This commit is contained in:
David Guillen Fandos 2021-03-05 01:14:31 +01:00
parent 6770e0a5e7
commit 89bd699837
1 changed files with 3 additions and 1 deletions

View File

@ -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];