1 |
/* BFD back-end for OSF/1 core files. |
/* BFD back-end for OSF/1 core files. |
2 |
Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002 |
Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002, 2003, 2004 |
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. |
32 |
|
|
33 |
static asection *make_bfd_asection |
static asection *make_bfd_asection |
34 |
PARAMS ((bfd *, const char *, flagword, bfd_size_type, bfd_vma, file_ptr)); |
PARAMS ((bfd *, const char *, flagword, bfd_size_type, bfd_vma, file_ptr)); |
35 |
static const bfd_target *osf_core_core_file_p PARAMS ((bfd *)); |
static const bfd_target *osf_core_core_file_p |
36 |
static char *osf_core_core_file_failing_command PARAMS ((bfd *)); |
PARAMS ((bfd *)); |
37 |
static int osf_core_core_file_failing_signal PARAMS ((bfd *)); |
static char *osf_core_core_file_failing_command |
38 |
static boolean osf_core_core_file_matches_executable_p PARAMS ((bfd *, bfd *)); |
PARAMS ((bfd *)); |
39 |
static void swap_abort PARAMS ((void)); |
static int osf_core_core_file_failing_signal |
40 |
|
PARAMS ((bfd *)); |
41 |
|
static bfd_boolean osf_core_core_file_matches_executable_p |
42 |
|
PARAMS ((bfd *, bfd *)); |
43 |
|
static void swap_abort |
44 |
|
PARAMS ((void)); |
45 |
|
|
46 |
/* These are stored in the bfd's tdata */ |
/* These are stored in the bfd's tdata */ |
47 |
|
|
56 |
#define core_command(bfd) (core_hdr(bfd)->cmd) |
#define core_command(bfd) (core_hdr(bfd)->cmd) |
57 |
|
|
58 |
static asection * |
static asection * |
59 |
make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos) |
make_bfd_asection (abfd, name, flags, size, vma, filepos) |
60 |
bfd *abfd; |
bfd *abfd; |
61 |
const char *name; |
const char *name; |
62 |
flagword flags; |
flagword flags; |
63 |
bfd_size_type _raw_size; |
bfd_size_type size; |
64 |
bfd_vma vma; |
bfd_vma vma; |
65 |
file_ptr filepos; |
file_ptr filepos; |
66 |
{ |
{ |
71 |
return NULL; |
return NULL; |
72 |
|
|
73 |
asect->flags = flags; |
asect->flags = flags; |
74 |
asect->_raw_size = _raw_size; |
asect->size = size; |
75 |
asect->vma = vma; |
asect->vma = vma; |
76 |
asect->filepos = filepos; |
asect->filepos = filepos; |
77 |
asect->alignment_power = 8; |
asect->alignment_power = 8; |
164 |
return core_command (abfd); |
return core_command (abfd); |
165 |
} |
} |
166 |
|
|
|
/* ARGSUSED */ |
|
167 |
static int |
static int |
168 |
osf_core_core_file_failing_signal (abfd) |
osf_core_core_file_failing_signal (abfd) |
169 |
bfd *abfd; |
bfd *abfd; |
171 |
return core_signal (abfd); |
return core_signal (abfd); |
172 |
} |
} |
173 |
|
|
174 |
/* ARGSUSED */ |
static bfd_boolean |
|
static boolean |
|
175 |
osf_core_core_file_matches_executable_p (core_bfd, exec_bfd) |
osf_core_core_file_matches_executable_p (core_bfd, exec_bfd) |
176 |
bfd *core_bfd ATTRIBUTE_UNUSED; |
bfd *core_bfd ATTRIBUTE_UNUSED; |
177 |
bfd *exec_bfd ATTRIBUTE_UNUSED; |
bfd *exec_bfd ATTRIBUTE_UNUSED; |
178 |
{ |
{ |
179 |
return true; /* FIXME, We have no way of telling at this point */ |
return TRUE; /* FIXME, We have no way of telling at this point */ |
180 |
} |
} |
181 |
|
|
182 |
/* If somebody calls any byte-swapping routines, shoot them. */ |
/* If somebody calls any byte-swapping routines, shoot them. */ |
185 |
{ |
{ |
186 |
abort(); /* This way doesn't require any declaration for ANSI to fuck up */ |
abort(); /* This way doesn't require any declaration for ANSI to fuck up */ |
187 |
} |
} |
188 |
#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) |
|
189 |
#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) |
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) |
190 |
#define NO_SIGNED_GET \ |
#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) |
191 |
((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort ) |
#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) |
192 |
|
#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) |
193 |
|
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) |
194 |
|
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) |
195 |
|
|
196 |
const bfd_target osf_core_vec = |
const bfd_target osf_core_vec = |
197 |
{ |
{ |
206 |
0, /* symbol prefix */ |
0, /* symbol prefix */ |
207 |
' ', /* ar_pad_char */ |
' ', /* ar_pad_char */ |
208 |
16, /* ar_max_namelen */ |
16, /* ar_max_namelen */ |
209 |
NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit data */ |
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */ |
210 |
NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit data */ |
NO_GET, NO_GETS, NO_PUT, /* 32 bit data */ |
211 |
NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit data */ |
NO_GET, NO_GETS, NO_PUT, /* 16 bit data */ |
212 |
NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit hdrs */ |
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */ |
213 |
NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit hdrs */ |
NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */ |
214 |
NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit hdrs */ |
NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */ |
215 |
|
|
216 |
{ /* bfd_check_format */ |
{ /* bfd_check_format */ |
217 |
_bfd_dummy_target, /* unknown format */ |
_bfd_dummy_target, /* unknown format */ |
218 |
_bfd_dummy_target, /* object file */ |
_bfd_dummy_target, /* object file */ |
219 |
_bfd_dummy_target, /* archive */ |
_bfd_dummy_target, /* archive */ |
220 |
osf_core_core_file_p /* a core file */ |
osf_core_core_file_p /* a core file */ |
221 |
}, |
}, |
222 |
{ /* bfd_set_format */ |
{ /* bfd_set_format */ |
223 |
bfd_false, bfd_false, |
bfd_false, bfd_false, |
224 |
bfd_false, bfd_false |
bfd_false, bfd_false |
225 |
}, |
}, |
226 |
{ /* bfd_write_contents */ |
{ /* bfd_write_contents */ |
227 |
bfd_false, bfd_false, |
bfd_false, bfd_false, |
228 |
bfd_false, bfd_false |
bfd_false, bfd_false |
229 |
}, |
}, |
230 |
|
|
231 |
BFD_JUMP_TABLE_GENERIC (_bfd_generic), |
BFD_JUMP_TABLE_GENERIC (_bfd_generic), |
241 |
NULL, |
NULL, |
242 |
|
|
243 |
(PTR) 0 /* backend_data */ |
(PTR) 0 /* backend_data */ |
244 |
}; |
}; |