#include "syscall.h"
#include "target_signal.h"
#include "gdbstub.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
-#if defined(USE_NPTL)
+#if defined(CONFIG_USE_NPTL)
#define THREAD __thread
#else
#define THREAD
* task_struct fields in the kernel
*/
struct image_info {
+ abi_ulong load_bias;
abi_ulong load_addr;
abi_ulong start_code;
abi_ulong end_code;
abi_ulong mmap;
abi_ulong rss;
abi_ulong start_stack;
+ abi_ulong stack_limit;
abi_ulong entry;
abi_ulong code_offset;
abi_ulong data_offset;
uint32_t v86flags;
uint32_t v86mask;
#endif
-#ifdef USE_NPTL
+#ifdef CONFIG_USE_NPTL
abi_ulong child_tidptr;
#endif
#ifdef TARGET_M68K
void task_settid(TaskState *);
void stop_all_tasks(void);
extern const char *qemu_uname_release;
-#if defined(CONFIG_USE_GUEST_BASE)
extern unsigned long mmap_min_addr;
-#endif
/* ??? See if we can avoid exposing so much of the loader internals. */
/*
*/
#define MAX_ARG_PAGES 33
+/* Read a good amount of data initially, to hopefully get all the
+ program headers loaded. */
+#define BPRM_BUF_SIZE 1024
+
/*
* This structure is used to hold the arguments that are
* used when loading binaries.
*/
struct linux_binprm {
- char buf[128];
+ char buf[BPRM_BUF_SIZE] __attribute__((aligned));
void *page[MAX_ARG_PAGES];
abi_ulong p;
int fd;
struct image_info * info);
int load_flt_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
struct image_info * info);
-#ifdef TARGET_HAS_ELFLOAD32
-int load_elf_binary_multi(struct linux_binprm *bprm,
- struct target_pt_regs *regs,
- struct image_info *info);
-#endif
abi_long memcpy_to_target(abi_ulong dest, const void *src,
unsigned long len);
void gemu_log(const char *fmt, ...) __attribute__((format(printf,1,2)));
extern THREAD CPUState *thread_env;
void cpu_loop(CPUState *env);
-void init_paths(const char *prefix);
-const char *path(const char *pathname);
char *target_strerror(int err);
int get_osversion(void);
void fork_start(void);
abi_ulong mmap_find_vma(abi_ulong, abi_ulong);
void cpu_list_lock(void);
void cpu_list_unlock(void);
-#if defined(USE_NPTL)
+#if defined(CONFIG_USE_NPTL)
void mmap_fork_start(void);
void mmap_fork_end(int child);
#endif
/* main.c */
-extern unsigned long x86_stack_size;
+extern unsigned long guest_stack_size;
/* user access */
#define unlock_user_struct(host_ptr, guest_addr, copy) \
unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0)
-#if defined(USE_NPTL)
+#if defined(CONFIG_USE_NPTL)
#include <pthread.h>
#endif