The current code has problems with constant data in other
than the default code segments. For example this
produces illegal code:
#define CODE2 __attribute__ ((section ("code2")))
void CODE2 func(int i) {
static const int foo[] = {1,2,3}
return foo(i);
}
The problem is that foo is put in the code2 segment but is
accessed as if it would be in the data segment. The
attached patch fixes these problems. It is against
prctools-2.1 and patches
gcc-2.95.3/gcc/config/m68k/m68kpalmos.h in a patched
gcc.
Problems: constant data is always put in the default code
segment, even if it is declared inside a function in a
different code segment. It can be explicitly declared to
reside in a different code segment though.