I'm trying to run an elf image for an embedded system in Qemu. I read that we can pass elf binaries to Qemu with -kernel option and it configures itself to run the code from the entry address specified in the elf header.
Qemu only allows max 256MB of ram for the specific machine type that I'm trying to emulate. But the entry address in the elf file is out of the range of address space of 256MB ram. So when I connect with gdb and read ram contents starting from the entry address, all I get is 0s.
So my question is, is there any option in the qemu to map a specific address space to the available RAM?
I ran objcopy and got a binary file but its size too large to fit into the ram of qemu(max 256MB).