bsd-user/mmap.c: Don't try to override g_malloc/g_free
commitb7b5233ad7fdd9985bb6d05b7919f3a20723ff2c
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 3 Jun 2014 23:13:31 +0000 (4 00:13 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 10 Jun 2014 23:25:06 +0000 (11 00:25 +0100)
tree094920ce40c84d416a7fc034115ba86ae657a924
parent591b320ad046b2780c1b2841b836b50ba8192f02
bsd-user/mmap.c: Don't try to override g_malloc/g_free

Trying to override the implementations of g_malloc and g_free is
a really bad idea -- it means statically linked builds fail to
link (because of the multiple definitions provided by this file
and by glib), and non-statically linked builds segfault as soon
as they try to do anything more complicated than printing the
usage message. Remove these overridden versions and just use
the glib ones.

This is sufficient that bsd-user can run basic x86-64
binaries on OpenBSD again; FreeBSD and NetBSD seem to have
further issues.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Sean Bruno <sbruno@freebsd.org>
Reviewed-by: Ed Maste <emaste@freebsd.org>
bsd-user/mmap.c