Commit 992f48a0 authored by blueswir1's avatar blueswir1

Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3396 c046a42c-6fe2-441c-8c8c-71466251a162
parent b227a8e9
......@@ -31,7 +31,10 @@ CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
endif
ifdef CONFIG_LINUX_USER
VPATH+=:$(SRC_PATH)/linux-user
CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
ifndef TARGET_ABI_DIR
TARGET_ABI_DIR=$(TARGET_ARCH)
endif
CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
endif
BASE_CFLAGS=
BASE_LDFLAGS=
......@@ -66,6 +69,11 @@ ifeq ($(TARGET_ARCH),mips64)
TARGET_ARCH2=mips64el
endif
endif
ifeq ($(TARGET_ARCH),sparc64)
ifeq ($(TARGET_ABI_DIR),sparc)
TARGET_ARCH2=sparc32plus
endif
endif
QEMU_USER=qemu-$(TARGET_ARCH2)
# system emulator name
ifdef CONFIG_SOFTMMU
......
......@@ -504,7 +504,7 @@ if test -z "$target_list" ; then
fi
# the following are Linux specific
if [ "$linux_user" = "yes" ] ; then
target_list="i386-linux-user arm-linux-user armeb-linux-user sparc-linux-user mips-linux-user mipsel-linux-user m68k-linux-user alpha-linux-user sh4-linux-user ppc-linux-user ppc64-linux-user x86_64-linux-user cris-linux-user $target_list"
target_list="i386-linux-user arm-linux-user armeb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user mips-linux-user mipsel-linux-user m68k-linux-user alpha-linux-user sh4-linux-user ppc-linux-user ppc64-linux-user x86_64-linux-user cris-linux-user $target_list"
fi
# the following are Darwin specific
if [ "$darwin_user" = "yes" ] ; then
......@@ -933,6 +933,7 @@ target_bigendian="no"
[ "$target_cpu" = "armeb" ] && target_bigendian=yes
[ "$target_cpu" = "sparc" ] && target_bigendian=yes
[ "$target_cpu" = "sparc64" ] && target_bigendian=yes
[ "$target_cpu" = "sparc32plus" ] && target_bigendian=yes
[ "$target_cpu" = "ppc" ] && target_bigendian=yes
[ "$target_cpu" = "ppcemb" ] && target_bigendian=yes
[ "$target_cpu" = "ppc64" ] && target_bigendian=yes
......@@ -1026,6 +1027,13 @@ elif test "$target_cpu" = "sparc64" ; then
echo "#define TARGET_SPARC 1" >> $config_h
echo "#define TARGET_SPARC64 1" >> $config_h
elfload32="yes"
elif test "$target_cpu" = "sparc32plus" ; then
echo "TARGET_ARCH=sparc64" >> $config_mak
echo "TARGET_ABI_DIR=sparc" >> $config_mak
echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
echo "#define TARGET_SPARC 1" >> $config_h
echo "#define TARGET_SPARC64 1" >> $config_h
echo "#define TARGET_ABI32 1" >> $config_h
elif test "$target_cpu" = "ppc" ; then
echo "TARGET_ARCH=ppc" >> $config_mak
echo "#define TARGET_ARCH \"ppc\"" >> $config_h
......@@ -1113,7 +1121,7 @@ if test "$target_darwin_user" = "yes" ; then
echo "#define CONFIG_DARWIN_USER 1" >> $config_h
fi
if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" -o "$target_cpu" = "sparc" -o "$target_cpu" = "sparc64" -o "$target_cpu" = "m68k" -o "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" -o "$target_cpu" = "mipsn32" -o "$target_cpu" = "mipsn32el" -o "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el"; then
if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" -o "$target_cpu" = "sparc" -o "$target_cpu" = "sparc64" -o "$target_cpu" = "sparc32plus" -o "$target_cpu" = "m68k" -o "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" -o "$target_cpu" = "mipsn32" -o "$target_cpu" = "mipsn32el" -o "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el"; then
echo "CONFIG_SOFTFLOAT=yes" >> $config_mak
echo "#define CONFIG_SOFTFLOAT 1" >> $config_h
fi
......
......@@ -2,40 +2,40 @@
#define __USER_DS (1)
struct target_pt_regs {
target_ulong r0;
target_ulong r1;
target_ulong r2;
target_ulong r3;
target_ulong r4;
target_ulong r5;
target_ulong r6;
target_ulong r7;
target_ulong r8;
target_ulong r19;
target_ulong r20;
target_ulong r21;
target_ulong r22;
target_ulong r23;
target_ulong r24;
target_ulong r25;
target_ulong r26;
target_ulong r27;
target_ulong r28;
target_ulong hae;
abi_ulong r0;
abi_ulong r1;
abi_ulong r2;
abi_ulong r3;
abi_ulong r4;
abi_ulong r5;
abi_ulong r6;
abi_ulong r7;
abi_ulong r8;
abi_ulong r19;
abi_ulong r20;
abi_ulong r21;
abi_ulong r22;
abi_ulong r23;
abi_ulong r24;
abi_ulong r25;
abi_ulong r26;
abi_ulong r27;
abi_ulong r28;
abi_ulong hae;
/* JRP - These are the values provided to a0-a2 by PALcode */
target_ulong trap_a0;
target_ulong trap_a1;
target_ulong trap_a2;
abi_ulong trap_a0;
abi_ulong trap_a1;
abi_ulong trap_a2;
/* These are saved by PAL-code: */
target_ulong ps;
target_ulong pc;
target_ulong gp;
target_ulong r16;
target_ulong r17;
target_ulong r18;
abi_ulong ps;
abi_ulong pc;
abi_ulong gp;
abi_ulong r16;
abi_ulong r17;
abi_ulong r18;
/* Those is needed by qemu to temporary store the user stack pointer */
target_ulong usp;
target_ulong unique;
abi_ulong usp;
abi_ulong unique;
};
#define UNAME_MACHINE "alpha"
......@@ -6,9 +6,9 @@
/* this struct defines a stack used during syscall handling */
typedef struct target_sigaltstack {
target_ulong ss_sp;
target_long ss_flags;
target_ulong ss_size;
abi_ulong ss_sp;
abi_long ss_flags;
abi_ulong ss_size;
} target_stack_t;
......@@ -21,7 +21,7 @@ typedef struct target_sigaltstack {
#define TARGET_MINSIGSTKSZ 4096
#define TARGET_SIGSTKSZ 16384
static inline target_ulong get_sp_from_cpustate(CPUAlphaState *state)
static inline abi_ulong get_sp_from_cpustate(CPUAlphaState *state)
{
return state->ir[IR_SP];
}
......
......@@ -3,7 +3,7 @@
stack during a system call. */
struct target_pt_regs {
target_long uregs[18];
abi_long uregs[18];
};
#define ARM_cpsr uregs[16]
......
......@@ -6,9 +6,9 @@
/* this struct defines a stack used during syscall handling */
typedef struct target_sigaltstack {
target_ulong ss_sp;
target_long ss_flags;
target_ulong ss_size;
abi_ulong ss_sp;
abi_long ss_flags;
abi_ulong ss_size;
} target_stack_t;
......@@ -21,7 +21,7 @@ typedef struct target_sigaltstack {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_SIGSTKSZ 8192
static inline target_ulong get_sp_from_cpustate(CPUARMState *state)
static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
{
return state->regs[13];
}
......
......@@ -6,9 +6,9 @@
/* this struct defines a stack used during syscall handling */
typedef struct target_sigaltstack {
target_ulong ss_sp;
target_ulong ss_size;
target_long ss_flags;
abi_ulong ss_sp;
abi_ulong ss_size;
abi_long ss_flags;
} target_stack_t;
......@@ -21,7 +21,7 @@ typedef struct target_sigaltstack {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_SIGSTKSZ 8192
static inline target_ulong get_sp_from_cpustate(CPUCRISState *state)
static inline abi_ulong get_sp_from_cpustate(CPUCRISState *state)
{
return state->regs[14];
}
......
......@@ -172,7 +172,7 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
static inline void init_thread(struct target_pt_regs *regs, struct image_info *infop)
{
target_long stack = infop->start_stack;
abi_long stack = infop->start_stack;
memset(regs, 0, sizeof(*regs));
regs->ARM_cpsr = 0x10;
if (infop->entry & 1)
......@@ -214,7 +214,11 @@ enum
#define ELF_START_MMAP 0x80000000
#ifndef TARGET_ABI32
#define elf_check_arch(x) ( (x) == EM_SPARCV9 || (x) == EM_SPARC32PLUS )
#else
#define elf_check_arch(x) ( (x) == EM_SPARC32PLUS || (x) == EM_SPARC )
#endif
#define ELF_CLASS ELFCLASS64
#define ELF_DATA ELFDATA2MSB
......@@ -224,14 +228,20 @@ enum
static inline void init_thread(struct target_pt_regs *regs, struct image_info *infop)
{
#ifndef TARGET_ABI32
regs->tstate = 0;
#endif
regs->pc = infop->entry;
regs->npc = regs->pc + 4;
regs->y = 0;
#ifdef TARGET_ABI32
regs->u_regs[14] = infop->start_stack - 16 * 4;
#else
if (personality(infop->personality) == PER_LINUX32)
regs->u_regs[14] = infop->start_stack - 16 * 4;
else
regs->u_regs[14] = infop->start_stack - 16 * 8 - STACK_BIAS;
#endif
}
#else
......@@ -313,10 +323,10 @@ do { \
static inline void init_thread(struct target_pt_regs *_regs, struct image_info *infop)
{
target_ulong pos = infop->start_stack;
target_ulong tmp;
abi_ulong pos = infop->start_stack;
abi_ulong tmp;
#ifdef TARGET_PPC64
target_ulong entry, toc;
abi_ulong entry, toc;
#endif
_regs->msr = 1 << MSR_PR; /* Set user mode */
......@@ -333,9 +343,9 @@ static inline void init_thread(struct target_pt_regs *_regs, struct image_info *
* execution of PPC BSD programs.
*/
_regs->gpr[3] = tgetl(pos);
pos += sizeof(target_ulong);
pos += sizeof(abi_ulong);
_regs->gpr[4] = pos;
for (tmp = 1; tmp != 0; pos += sizeof(target_ulong))
for (tmp = 1; tmp != 0; pos += sizeof(abi_ulong))
tmp = ldl(pos);
_regs->gpr[5] = pos;
}
......@@ -475,9 +485,9 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
#define ELF_HWCAP 0
#endif
#ifdef OVERRIDE_ELF_CLASS
#ifdef TARGET_ABI32
#undef ELF_CLASS
#define ELF_CLASS OVERRIDE_ELF_CLASS
#define ELF_CLASS ELFCLASS32
#undef bswaptls
#define bswaptls(ptr) bswap32s(ptr)
#endif
......@@ -588,8 +598,8 @@ static void bswap_sym(struct elf_sym *sym)
* to be put directly into the top of new user memory.
*
*/
static target_ulong copy_elf_strings(int argc,char ** argv, void **page,
target_ulong p)
static abi_ulong copy_elf_strings(int argc,char ** argv, void **page,
abi_ulong p)
{
char *tmp, *tmp1, *pag = NULL;
int len, offset = 0;
......@@ -638,10 +648,10 @@ static target_ulong copy_elf_strings(int argc,char ** argv, void **page,
return p;
}
static target_ulong setup_arg_pages(target_ulong p, struct linux_binprm *bprm,
struct image_info *info)
static abi_ulong setup_arg_pages(abi_ulong p, struct linux_binprm *bprm,
struct image_info *info)
{
target_ulong stack_base, size, error;
abi_ulong stack_base, size, error;
int i;
/* Create enough stack to hold everything. If we don't use
......@@ -677,7 +687,7 @@ static target_ulong setup_arg_pages(target_ulong p, struct linux_binprm *bprm,
return p;
}
static void set_brk(target_ulong start, target_ulong end)
static void set_brk(abi_ulong start, abi_ulong end)
{
/* page-align the start and end addresses... */
start = HOST_PAGE_ALIGN(start);
......@@ -696,9 +706,9 @@ static void set_brk(target_ulong start, target_ulong end)
/* We need to explicitly zero any fractional pages after the data
section (i.e. bss). This would contain the junk from the file that
should not be in memory. */
static void padzero(target_ulong elf_bss, target_ulong last_bss)
static void padzero(abi_ulong elf_bss, abi_ulong last_bss)
{
target_ulong nbyte;
abi_ulong nbyte;
if (elf_bss >= last_bss)
return;
......@@ -709,7 +719,7 @@ static void padzero(target_ulong elf_bss, target_ulong last_bss)
patch target_mmap(), but it is more complicated as the file
size must be known */
if (qemu_real_host_page_size < qemu_host_page_size) {
target_ulong end_addr, end_addr1;
abi_ulong end_addr, end_addr1;
end_addr1 = (elf_bss + qemu_real_host_page_size - 1) &
~(qemu_real_host_page_size - 1);
end_addr = HOST_PAGE_ALIGN(elf_bss);
......@@ -731,16 +741,16 @@ static void padzero(target_ulong elf_bss, target_ulong last_bss)
}
static target_ulong create_elf_tables(target_ulong p, int argc, int envc,
struct elfhdr * exec,
target_ulong load_addr,
target_ulong load_bias,
target_ulong interp_load_addr, int ibcs,
struct image_info *info)
static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
struct elfhdr * exec,
abi_ulong load_addr,
abi_ulong load_bias,
abi_ulong interp_load_addr, int ibcs,
struct image_info *info)
{
target_ulong sp;
abi_ulong sp;
int size;
target_ulong u_platform;
abi_ulong u_platform;
const char *k_platform;
const int n = sizeof(elf_addr_t);
......@@ -756,7 +766,7 @@ static target_ulong create_elf_tables(target_ulong p, int argc, int envc,
/*
* Force 16 byte _final_ alignment here for generality.
*/
sp = sp &~ (target_ulong)15;
sp = sp &~ (abi_ulong)15;
size = (DLINFO_ITEMS + 1) * 2;
if (k_platform)
size += 2;
......@@ -786,18 +796,18 @@ static target_ulong create_elf_tables(target_ulong p, int argc, int envc,
NEW_AUX_ENT (AT_NULL, 0);
/* There must be exactly DLINFO_ITEMS entries here. */
NEW_AUX_ENT(AT_PHDR, (target_ulong)(load_addr + exec->e_phoff));
NEW_AUX_ENT(AT_PHENT, (target_ulong)(sizeof (struct elf_phdr)));
NEW_AUX_ENT(AT_PHNUM, (target_ulong)(exec->e_phnum));
NEW_AUX_ENT(AT_PAGESZ, (target_ulong)(TARGET_PAGE_SIZE));
NEW_AUX_ENT(AT_BASE, (target_ulong)(interp_load_addr));
NEW_AUX_ENT(AT_FLAGS, (target_ulong)0);
NEW_AUX_ENT(AT_PHDR, (abi_ulong)(load_addr + exec->e_phoff));
NEW_AUX_ENT(AT_PHENT, (abi_ulong)(sizeof (struct elf_phdr)));
NEW_AUX_ENT(AT_PHNUM, (abi_ulong)(exec->e_phnum));
NEW_AUX_ENT(AT_PAGESZ, (abi_ulong)(TARGET_PAGE_SIZE));
NEW_AUX_ENT(AT_BASE, (abi_ulong)(interp_load_addr));
NEW_AUX_ENT(AT_FLAGS, (abi_ulong)0);
NEW_AUX_ENT(AT_ENTRY, load_bias + exec->e_entry);
NEW_AUX_ENT(AT_UID, (target_ulong) getuid());
NEW_AUX_ENT(AT_EUID, (target_ulong) geteuid());
NEW_AUX_ENT(AT_GID, (target_ulong) getgid());
NEW_AUX_ENT(AT_EGID, (target_ulong) getegid());
NEW_AUX_ENT(AT_HWCAP, (target_ulong) ELF_HWCAP);
NEW_AUX_ENT(AT_UID, (abi_ulong) getuid());
NEW_AUX_ENT(AT_EUID, (abi_ulong) geteuid());
NEW_AUX_ENT(AT_GID, (abi_ulong) getgid());
NEW_AUX_ENT(AT_EGID, (abi_ulong) getegid());
NEW_AUX_ENT(AT_HWCAP, (abi_ulong) ELF_HWCAP);
if (k_platform)
NEW_AUX_ENT(AT_PLATFORM, u_platform);
#ifdef ARCH_DLINFO
......@@ -814,17 +824,17 @@ static target_ulong create_elf_tables(target_ulong p, int argc, int envc,
}
static target_ulong load_elf_interp(struct elfhdr * interp_elf_ex,
int interpreter_fd,
target_ulong *interp_load_addr)
static abi_ulong load_elf_interp(struct elfhdr * interp_elf_ex,
int interpreter_fd,
abi_ulong *interp_load_addr)
{
struct elf_phdr *elf_phdata = NULL;
struct elf_phdr *eppnt;
target_ulong load_addr = 0;
abi_ulong load_addr = 0;
int load_addr_set = 0;
int retval;
target_ulong last_bss, elf_bss;
target_ulong error;
abi_ulong last_bss, elf_bss;
abi_ulong error;
int i;
elf_bss = 0;
......@@ -838,20 +848,20 @@ static target_ulong load_elf_interp(struct elfhdr * interp_elf_ex,
if ((interp_elf_ex->e_type != ET_EXEC &&
interp_elf_ex->e_type != ET_DYN) ||
!elf_check_arch(interp_elf_ex->e_machine)) {
return ~((target_ulong)0UL);
return ~((abi_ulong)0UL);
}
/* Now read in all of the header information */
if (sizeof(struct elf_phdr) * interp_elf_ex->e_phnum > TARGET_PAGE_SIZE)
return ~(target_ulong)0UL;
return ~(abi_ulong)0UL;
elf_phdata = (struct elf_phdr *)
malloc(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum);
if (!elf_phdata)
return ~((target_ulong)0UL);
return ~((abi_ulong)0UL);
/*
* If the size of this structure has changed, then punt, since
......@@ -859,7 +869,7 @@ static target_ulong load_elf_interp(struct elfhdr * interp_elf_ex,
*/
if (interp_elf_ex->e_phentsize != sizeof(struct elf_phdr)) {
free(elf_phdata);
return ~((target_ulong)0UL);
return ~((abi_ulong)0UL);
}
retval = lseek(interpreter_fd, interp_elf_ex->e_phoff, SEEK_SET);
......@@ -900,8 +910,8 @@ static target_ulong load_elf_interp(struct elfhdr * interp_elf_ex,
if (eppnt->p_type == PT_LOAD) {
int elf_type = MAP_PRIVATE | MAP_DENYWRITE;
int elf_prot = 0;
target_ulong vaddr = 0;
target_ulong k;
abi_ulong vaddr = 0;
abi_ulong k;
if (eppnt->p_flags & PF_R) elf_prot = PROT_READ;
if (eppnt->p_flags & PF_W) elf_prot |= PROT_WRITE;
......@@ -921,7 +931,7 @@ static target_ulong load_elf_interp(struct elfhdr * interp_elf_ex,
/* Real error */
close(interpreter_fd);
free(elf_phdata);
return ~((target_ulong)0UL);
return ~((abi_ulong)0UL);
}
if (!load_addr_set && interp_elf_ex->e_type == ET_DYN) {
......@@ -966,7 +976,7 @@ static target_ulong load_elf_interp(struct elfhdr * interp_elf_ex,
free(elf_phdata);
*interp_load_addr = load_addr;
return ((target_ulong) interp_elf_ex->e_entry) + load_addr;
return ((abi_ulong) interp_elf_ex->e_entry) + load_addr;
}
/* Best attempt to load symbols from this ELF object. */
......@@ -1054,22 +1064,22 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
struct elfhdr interp_elf_ex;
struct exec interp_ex;
int interpreter_fd = -1; /* avoid warning */
target_ulong load_addr, load_bias;
abi_ulong load_addr, load_bias;
int load_addr_set = 0;
unsigned int interpreter_type = INTERPRETER_NONE;
unsigned char ibcs2_interpreter;
int i;
target_ulong mapped_addr;
abi_ulong mapped_addr;
struct elf_phdr * elf_ppnt;
struct elf_phdr *elf_phdata;
target_ulong elf_bss, k, elf_brk;
abi_ulong elf_bss, k, elf_brk;
int retval;
char * elf_interpreter;
target_ulong elf_entry, interp_load_addr = 0;
abi_ulong elf_entry, interp_load_addr = 0;
int status;
target_ulong start_code, end_code, start_data, end_data;
target_ulong reloc_func_desc = 0;
target_ulong elf_stack;
abi_ulong start_code, end_code, start_data, end_data;
abi_ulong reloc_func_desc = 0;
abi_ulong elf_stack;
char passed_fileno[6];
ibcs2_interpreter = 0;
......@@ -1125,9 +1135,9 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
elf_brk = 0;
elf_stack = ~((target_ulong)0UL);
elf_stack = ~((abi_ulong)0UL);
elf_interpreter = NULL;
start_code = ~((target_ulong)0UL);
start_code = ~((abi_ulong)0UL);
end_code = 0;
start_data = 0;
end_data = 0;
......@@ -1263,9 +1273,9 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
/* OK, This is the point of no return */
info->end_data = 0;
info->end_code = 0;
info->start_mmap = (target_ulong)ELF_START_MMAP;
info->start_mmap = (abi_ulong)ELF_START_MMAP;
info->mmap = 0;
elf_entry = (target_ulong) elf_ex.e_entry;
elf_entry = (abi_ulong) elf_ex.e_entry;
/* Do this so that we can load the interpreter, if need be. We will
change some of these later */
......@@ -1282,7 +1292,7 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
for(i = 0, elf_ppnt = elf_phdata; i < elf_ex.e_phnum; i++, elf_ppnt++) {
int elf_prot = 0;
int elf_flags = 0;
target_ulong error;
abi_ulong error;
if (elf_ppnt->p_type != PT_LOAD)
continue;
......@@ -1374,7 +1384,7 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
close(interpreter_fd);
free(elf_interpreter);
if (elf_entry == ~((target_ulong)0UL)) {
if (elf_entry == ~((abi_ulong)0UL)) {
printf("Unable to load interpreter\n");
free(elf_phdata);
exit(-1);
......
#define OVERRIDE_ELF_CLASS ELFCLASS32
#define TARGET_ABI32
#define load_elf_binary load_elf_binary32
#define do_init_thread do_init_thread32
......
......@@ -22,25 +22,25 @@
struct flat_hdr {
char magic[4];
target_ulong rev; /* version (as above) */
target_ulong entry; /* Offset of first executable instruction
with text segment from beginning of file */
target_ulong data_start; /* Offset of data segment from beginning of
file */
target_ulong data_end; /* Offset of end of data segment
from beginning of file */
target_ulong bss_end; /* Offset of end of bss segment from beginning
of file */
abi_ulong rev; /* version (as above) */
abi_ulong entry; /* Offset of first executable instruction
with text segment from beginning of file */
abi_ulong data_start; /* Offset of data segment from beginning of
file */
abi_ulong data_end; /* Offset of end of data segment
from beginning of file */
abi_ulong bss_end; /* Offset of end of bss segment from beginning
of file */
/* (It is assumed that data_end through bss_end forms the bss segment.) */
target_ulong stack_size; /* Size of stack, in bytes */
target_ulong reloc_start; /* Offset of relocation records from
beginning of file */
target_ulong reloc_count; /* Number of relocation records */
target_ulong flags;
target_ulong build_date; /* When the program/library was built */
target_ulong filler[5]; /* Reservered, set to zero */
abi_ulong stack_size; /* Size of stack, in bytes */
abi_ulong reloc_start; /* Offset of relocation records from
beginning of file */
abi_ulong reloc_count; /* Number of relocation records */
abi_ulong flags;
abi_ulong build_date; /* When the program/library was built */
abi_ulong filler[5]; /* Reservered, set to zero */
};
#define FLAT_FLAG_RAM 0x0001 /* load program entirely into RAM */
......
......@@ -63,13 +63,13 @@
#define UNLOADED_LIB 0x7ff000ff /* Placeholder for unused library */
<