summary refs log tree commit diff stats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorCédric VINCENT <cedric.vincent@st.com>2011-06-01 14:36:38 +0200
committerRiku Voipio <riku.voipio@iki.fi>2011-06-21 20:28:38 +0300
commitb947527941b17c8f4a31f95dfa114e467ba1325d (patch)
treeabce75256b9aef83035effb1a0bec2708f5582f5 /linux-user/syscall.c
parent9a826d7854baf6b90de46fea785d1bfc5d2c22a7 (diff)
downloadfocaccia-qemu-b947527941b17c8f4a31f95dfa114e467ba1325d.tar.gz
focaccia-qemu-b947527941b17c8f4a31f95dfa114e467ba1325d.zip
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 <cedric.vincent@st.com>
Signed-off-by: Yves JANIN <yves.janin@st.com>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'linux-user/syscall.c')
0 files changed, 0 insertions, 0 deletions