elf: use ro/rw classes depending on ELF access protection flag
runtime: improve test w/ heap alloc