1 |
/* BFD back-end for i386 a.out binaries. |
/* BFD back-end for i386 a.out binaries. |
2 |
Copyright 1990, 1991, 1992, 1994, 1996, 1997, 2001 |
Copyright 1990, 1991, 1992, 1994, 1996, 1997, 2001, 2002, 2003, 2005 |
3 |
Free Software Foundation, Inc. |
Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of BFD, the Binary File Descriptor library. |
This file is part of BFD, the Binary File Descriptor library. |
26 |
system, and I'll stick it in for the next release. */ |
system, and I'll stick it in for the next release. */ |
27 |
|
|
28 |
#define N_HEADER_IN_TEXT(x) 0 |
#define N_HEADER_IN_TEXT(x) 0 |
|
#define BYTES_IN_WORD 4 |
|
29 |
|
|
30 |
#define N_TXTOFF(x) 0x20 |
#define N_TXTOFF(x) 0x20 |
31 |
#define N_TXTADDR(x) (N_MAGIC(x)==ZMAGIC ? 0x1020 : 0) |
#define N_TXTADDR(x) (N_MAGIC(x)==ZMAGIC ? 0x1020 : 0) |
32 |
|
|
33 |
#define N_TXTSIZE(x) ((x).a_text) |
#define N_TXTSIZE(x) ((x).a_text) |
|
#if 0 |
|
|
#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+(x).a_text) : (SEGMENT_SIZE + ((0x1020+(x).a_text-1) & ~(SEGMENT_SIZE-1)))) |
|
|
#define NOSUBEXECB |
|
|
|
|
|
#endif |
|
34 |
#define TARGET_PAGE_SIZE 4096 |
#define TARGET_PAGE_SIZE 4096 |
35 |
#define SEGMENT_SIZE 0x400000 |
#define SEGMENT_SIZE 0x400000 |
36 |
#define DEFAULT_ARCH bfd_arch_i386 |
#define DEFAULT_ARCH bfd_arch_i386 |
48 |
#include "aout/aout64.h" |
#include "aout/aout64.h" |
49 |
#include "libaout.h" |
#include "libaout.h" |
50 |
|
|
51 |
static boolean i386aout_write_object_contents PARAMS ((bfd *)); |
static bfd_boolean i386aout_write_object_contents PARAMS ((bfd *)); |
52 |
static boolean MY (set_sizes) PARAMS ((bfd *)); |
static bfd_boolean MY (set_sizes) PARAMS ((bfd *)); |
53 |
|
|
54 |
/* Set the machine type correctly. */ |
/* Set the machine type correctly. */ |
55 |
|
|
56 |
static boolean |
static bfd_boolean |
57 |
i386aout_write_object_contents (abfd) |
i386aout_write_object_contents (abfd) |
58 |
bfd *abfd; |
bfd *abfd; |
59 |
{ |
{ |
66 |
|
|
67 |
WRITE_HEADERS (abfd, execp); |
WRITE_HEADERS (abfd, execp); |
68 |
|
|
69 |
return true; |
return TRUE; |
70 |
} |
} |
71 |
|
|
72 |
#define MY_write_object_contents i386aout_write_object_contents |
#define MY_write_object_contents i386aout_write_object_contents |