changed bas_rom memory flags to WX when compiling to RAM. Should fix global variables problem since .bss was previously mapped to nonexistant memory locations with ld trying to be smart

This commit is contained in:
Markus Fröschle
2013-11-05 06:31:35 +00:00
parent d1210fa0fd
commit 19f3e2c39d

View File

@@ -6,10 +6,16 @@
#include "m5484l.h"
#endif /* MACHINE_M5484LITE */
/* make bas_rom access flags rx if compiling to RAM */
#if (TARGET_ADDRESS < 0x1FFFFFFF && TARGET_ADDRESS > 0)
#define ROMFLAGS WX
#else
#define ROMFLAGS RX
#endif /* TARGET_ADDRESS */
MEMORY
{
bas_rom (RX) : ORIGIN = TARGET_ADDRESS, LENGTH = 0x00100000
bas_rom (ROMFLAGS) : ORIGIN = TARGET_ADDRESS, LENGTH = 0x00100000
/*
* target to copy BaS data segment to. 20k should be enough for now
*/