s390x/ipl: Fix crash of ELF images with arbitrary entry points
commit7f00eb30febf1054c74b163ced984afcdbf6e670
authorThomas Huth <thuth@linux.vnet.ibm.com>
Sat, 8 Feb 2014 11:31:15 +0000 (8 12:31 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 27 Feb 2014 08:51:26 +0000 (27 09:51 +0100)
treed71bbc68cc855edb7d898f42fb8542b131c6a798
parent1eecf41b3e8128979dd571f63d0b4c7fedc919c2
s390x/ipl: Fix crash of ELF images with arbitrary entry points

When loading S390 kernels, the current code expects an ELF file with the
start address 0x10000. Other ELF files cause a segmentation fault. To avoid
these crashes, we should get the start address from the ELF file instead
of always using a hard-coded address.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
hw/s390x/ipl.c