« Previous | Next » 

Revision b9475279

IDb947527941b17c8f4a31f95dfa114e467ba1325d

Added by Cédric VINCENT almost 13 years ago

linux-user: Fix the load of ELF files that have no "useful" symbol

This patch fixes a "double free()" due to "realloc(syms, 0)" in the
loader when the ELF file has no "useful" symbol, as with the following
example (compiled with "sh4-linux-gcc -nostdlib"):

.text
.align 1
.global start
_start:
mov #1, r3
trapa #40 // syscall(
_NR_exit)
nop

The bug appears when the log (option "-d") is enabled.

Signed-off-by: Cédric VINCENT <>
Signed-off-by: Yves JANIN <>
Signed-off-by: Riku Voipio <>
Reviewed-by: Richard Henderson <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences