diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2026-05-30 12:20:08 -0700 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2026-07-10 14:39:58 -0700 |
| commit | 544f4c5b68d5ec9d26f7ccceeff9766546e3b2bf (patch) | |
| tree | cbcdd089c89a218ad692a55fe1d938f10a4e31e3 | |
| parent | 259de598b3565a1d0e97df65d9b07adef2add0a1 (diff) | |
| download | qemu-544f4c5b68d5ec9d26f7ccceeff9766546e3b2bf.tar.gz qemu-544f4c5b68d5ec9d26f7ccceeff9766546e3b2bf.zip | |
common-user: Move selfmap from util
This interface is only used for user-only. It's more usefully
placed within common-user than util. Temporarily add stub
implementation for bsd-user.
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| -rw-r--r-- | common-user/meson.build | 1 | ||||
| -rw-r--r-- | common-user/selfmap.c (renamed from util/selfmap.c) | 6 | ||||
| -rw-r--r-- | include/user/selfmap.h (renamed from include/qemu/selfmap.h) | 0 | ||||
| -rw-r--r-- | linux-user/elfload.c | 2 | ||||
| -rw-r--r-- | linux-user/syscall.c | 2 | ||||
| -rw-r--r-- | util/meson.build | 4 |
6 files changed, 8 insertions, 7 deletions
diff --git a/common-user/meson.build b/common-user/meson.build index f9e2e83f9a..831a7273fb 100644 --- a/common-user/meson.build +++ b/common-user/meson.build @@ -8,4 +8,5 @@ user_ss.add(files( 'mmap-min-addr.c', 'safe-syscall.S', 'safe-syscall-error.c', + 'selfmap.c', )) diff --git a/util/selfmap.c b/common-user/selfmap.c index 483cb617e2..a1b88dee66 100644 --- a/util/selfmap.c +++ b/common-user/selfmap.c @@ -8,10 +8,11 @@ #include "qemu/osdep.h" #include "qemu/cutils.h" -#include "qemu/selfmap.h" +#include "user/selfmap.h" IntervalTreeRoot *read_self_maps(void) { +#ifdef __linux__ IntervalTreeRoot *root; gchar *maps, **lines; guint i, nlines; @@ -80,6 +81,9 @@ IntervalTreeRoot *read_self_maps(void) g_free(maps); return root; +#else + return NULL; +#endif } /** diff --git a/include/qemu/selfmap.h b/include/user/selfmap.h index 1690a74f4b..1690a74f4b 100644 --- a/include/qemu/selfmap.h +++ b/include/user/selfmap.h diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 0671aba537..207f814e15 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -25,7 +25,7 @@ #include "qemu/queue.h" #include "qemu/guest-random.h" #include "qemu/units.h" -#include "qemu/selfmap.h" +#include "user/selfmap.h" #include "qemu/lockable.h" #include "qapi/error.h" #include "qemu/error-report.h" diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d257fb9ca9..b3572a6e36 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -141,7 +141,7 @@ #include "user/safe-syscall.h" #include "user/signal.h" #include "qemu/guest-random.h" -#include "qemu/selfmap.h" +#include "user/selfmap.h" #include "special-errno.h" #include "qapi/error.h" #include "fd-trans.h" diff --git a/util/meson.build b/util/meson.build index e29cbd948a..fa174c07a5 100644 --- a/util/meson.build +++ b/util/meson.build @@ -67,10 +67,6 @@ util_ss.add(files('memalign.c')) util_ss.add(files('interval-tree.c')) util_ss.add(files('lockcnt.c')) -if have_user - util_ss.add(files('selfmap.c')) -endif - if have_system util_ss.add(files('crc-ccitt.c')) util_ss.add(when: gio, if_true: files('dbus.c')) |
