1 |
/* BFD support for Sparc binaries under LynxOS. |
/* BFD support for Sparc binaries under LynxOS. |
2 |
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, |
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, |
3 |
2001 Free Software Foundation, Inc. |
2001, 2002, 2003, 2005 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. |
6 |
|
|
18 |
along with this program; if not, write to the Free Software |
along with this program; if not, write to the Free Software |
19 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
20 |
|
|
|
#if 0 |
|
|
#define BYTES_IN_WORD 4 |
|
|
#define N_SHARED_LIB(x) 0 |
|
|
|
|
|
#define TEXT_START_ADDR 0 |
|
|
#define TARGET_PAGE_SIZE 4096 |
|
|
#define SEGMENT_SIZE TARGET_PAGE_SIZE |
|
|
#define DEFAULT_ARCH bfd_arch_sparc |
|
|
|
|
|
#endif |
|
|
|
|
21 |
/* Do not "beautify" the CONCAT* macro args. Traditional C will not |
/* Do not "beautify" the CONCAT* macro args. Traditional C will not |
22 |
remove whitespace added here, and thus will fail to concatenate |
remove whitespace added here, and thus will fail to concatenate |
23 |
the tokens. */ |
the tokens. */ |
37 |
|
|
38 |
void NAME (lynx,set_arch_mach) PARAMS ((bfd *, unsigned long)); |
void NAME (lynx,set_arch_mach) PARAMS ((bfd *, unsigned long)); |
39 |
static void choose_reloc_size PARAMS ((bfd *)); |
static void choose_reloc_size PARAMS ((bfd *)); |
40 |
static boolean NAME (aout,sparclynx_write_object_contents) PARAMS ((bfd *)); |
static bfd_boolean NAME (aout,sparclynx_write_object_contents) PARAMS ((bfd *)); |
41 |
|
|
42 |
/* This is needed to reject a NewsOS file, e.g. in |
/* This is needed to reject a NewsOS file, e.g. in |
43 |
gdb/testsuite/gdb.t10/crossload.exp. <kingdon@cygnus.com> |
gdb/testsuite/gdb.t10/crossload.exp. <kingdon@cygnus.com> |
152 |
Section contents have already been written. We write the |
Section contents have already been written. We write the |
153 |
file header, symbols, and relocation. */ |
file header, symbols, and relocation. */ |
154 |
|
|
155 |
static boolean |
static bfd_boolean |
156 |
NAME(aout,sparclynx_write_object_contents) (abfd) |
NAME(aout,sparclynx_write_object_contents) (abfd) |
157 |
bfd *abfd; |
bfd *abfd; |
158 |
{ |
{ |
193 |
|
|
194 |
WRITE_HEADERS (abfd, execp); |
WRITE_HEADERS (abfd, execp); |
195 |
|
|
196 |
return true; |
return TRUE; |
197 |
} |
} |
198 |
|
|
199 |
#define MY_set_sizes sparclynx_set_sizes |
#define MY_set_sizes sparclynx_set_sizes |
200 |
static boolean sparclynx_set_sizes PARAMS ((bfd *)); |
static bfd_boolean sparclynx_set_sizes PARAMS ((bfd *)); |
201 |
|
|
202 |
static boolean |
static bfd_boolean |
203 |
sparclynx_set_sizes (abfd) |
sparclynx_set_sizes (abfd) |
204 |
bfd *abfd; |
bfd *abfd; |
205 |
{ |
{ |
206 |
switch (bfd_get_arch (abfd)) |
switch (bfd_get_arch (abfd)) |
207 |
{ |
{ |
208 |
default: |
default: |
209 |
return false; |
return FALSE; |
210 |
case bfd_arch_sparc: |
case bfd_arch_sparc: |
211 |
adata (abfd).page_size = 0x2000; |
adata (abfd).page_size = 0x2000; |
212 |
adata (abfd).segment_size = 0x2000; |
adata (abfd).segment_size = 0x2000; |
213 |
adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE; |
adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE; |
214 |
return true; |
return TRUE; |
215 |
case bfd_arch_m68k: |
case bfd_arch_m68k: |
216 |
adata (abfd).page_size = 0x2000; |
adata (abfd).page_size = 0x2000; |
217 |
adata (abfd).segment_size = 0x20000; |
adata (abfd).segment_size = 0x20000; |
218 |
adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE; |
adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE; |
219 |
return true; |
return TRUE; |
220 |
} |
} |
221 |
} |
} |
222 |
|
|
235 |
#define MY_bfd_debug_info_start bfd_void |
#define MY_bfd_debug_info_start bfd_void |
236 |
#define MY_bfd_debug_info_end bfd_void |
#define MY_bfd_debug_info_end bfd_void |
237 |
#define MY_bfd_debug_info_accumulate \ |
#define MY_bfd_debug_info_accumulate \ |
238 |
(void (*) PARAMS ((bfd *, struct sec *))) bfd_void |
(void (*) PARAMS ((bfd *, struct bfd_section *))) bfd_void |
239 |
|
|
240 |
#define MY_write_object_contents NAME(aout,sparclynx_write_object_contents) |
#define MY_write_object_contents NAME(aout,sparclynx_write_object_contents) |
241 |
#define MY_backend_data &sparclynx_aout_backend |
#define MY_backend_data &sparclynx_aout_backend |
244 |
|
|
245 |
#ifdef LYNX_CORE |
#ifdef LYNX_CORE |
246 |
|
|
247 |
char * lynx_core_file_failing_command (); |
char * lynx_core_file_failing_command (); |
248 |
int lynx_core_file_failing_signal (); |
int lynx_core_file_failing_signal (); |
249 |
boolean lynx_core_file_matches_executable_p (); |
bfd_boolean lynx_core_file_matches_executable_p (); |
250 |
const bfd_target * lynx_core_file_p (); |
const bfd_target * lynx_core_file_p (); |
251 |
|
|
252 |
#define MY_core_file_failing_command lynx_core_file_failing_command |
#define MY_core_file_failing_command lynx_core_file_failing_command |