1 /* bfd back-end for HP PA-RISC SOM objects.
2 Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
4 Contributed by the Center for Software Science at the
5 University of Utah (pa-gdb-bugs@cs.utah.edu).
7 This file is part of BFD, the Binary File Descriptor library.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
26 /* @@FIXME This is not a reasonable set of conditions to permit
27 cross-compilation, obviously. It also isn't enough to support hppa-elf
28 targets either. Can we eliminate the HPUX or BSD dependencies, or
29 at least get the conditionals more localized? */
30 #if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD)
36 #include <sys/types.h>
37 #include <sys/param.h>
40 #include <machine/reg.h>
41 #include <sys/user.h> /* After a.out.h */
45 /* Magic not defined in standard HP-UX header files until 8.0 */
47 #ifndef CPU_PA_RISC1_0
48 #define CPU_PA_RISC1_0 0x20B
49 #endif /* CPU_PA_RISC1_0 */
51 #ifndef CPU_PA_RISC1_1
52 #define CPU_PA_RISC1_1 0x210
53 #endif /* CPU_PA_RISC1_1 */
55 #ifndef _PA_RISC1_0_ID
56 #define _PA_RISC1_0_ID CPU_PA_RISC1_0
57 #endif /* _PA_RISC1_0_ID */
59 #ifndef _PA_RISC1_1_ID
60 #define _PA_RISC1_1_ID CPU_PA_RISC1_1
61 #endif /* _PA_RISC1_1_ID */
63 #ifndef _PA_RISC_MAXID
64 #define _PA_RISC_MAXID 0x2FF
65 #endif /* _PA_RISC_MAXID */
68 #define _PA_RISC_ID(__m_num) \
69 (((__m_num) == _PA_RISC1_0_ID) || \
70 ((__m_num) >= _PA_RISC1_1_ID && (__m_num) <= _PA_RISC_MAXID))
71 #endif /* _PA_RISC_ID */
76 struct som_exec_auxhdr e
;
80 hppa_object_setup (abfd
, file_hdrp
, aux_hdrp
)
82 struct header
*file_hdrp
;
83 struct som_exec_auxhdr
*aux_hdrp
;
85 struct container
*rawptr
;
87 struct hppa_data_struct
*rawptr1
;
88 asection
*text
, *data
, *bss
;
90 rawptr
= (struct container
*) bfd_zalloc (abfd
, sizeof (struct container
));
93 bfd_error
= no_memory
;
97 rawptr1
= (struct hppa_data_struct
*) bfd_zalloc (abfd
, sizeof (struct hppa_data_struct
));
100 bfd_error
= no_memory
;
104 abfd
->tdata
.hppa_data
= rawptr1
;
105 obj_file_hdr (abfd
) = &rawptr
->f
;
106 obj_aux_hdr (abfd
) = &rawptr
->e
;
107 *obj_file_hdr (abfd
) = *file_hdrp
;
108 *obj_aux_hdr (abfd
) = *aux_hdrp
;
110 /* Set the file flags */
111 abfd
->flags
= NO_FLAGS
;
112 if (file_hdrp
->entry_offset
)
113 abfd
->flags
|= HAS_RELOC
;
114 if (file_hdrp
->symbol_total
)
115 abfd
->flags
|= HAS_LINENO
| HAS_DEBUG
| HAS_SYMS
| HAS_LOCALS
;
117 bfd_get_start_address (abfd
) = aux_hdrp
->exec_entry
;
119 obj_pa_symbols (abfd
) = (hppa_symbol_type
*) NULL
;
120 bfd_get_symcount (abfd
) = file_hdrp
->symbol_total
;
122 bfd_default_set_arch_mach (abfd
, bfd_arch_hppa
, 0);
124 /* create the sections. This is raunchy, but bfd_close wants to reclaim
127 text
= bfd_make_section (abfd
, ".text");
128 data
= bfd_make_section (abfd
, ".data");
129 bss
= bfd_make_section (abfd
, ".bss");
131 text
->_raw_size
= aux_hdrp
->exec_tsize
;
132 data
->_raw_size
= aux_hdrp
->exec_dsize
;
133 bss
->_raw_size
= aux_hdrp
->exec_bsize
;
135 text
->flags
= (SEC_ALLOC
| SEC_LOAD
| SEC_HAS_CONTENTS
);
136 data
->flags
= (SEC_ALLOC
| SEC_LOAD
| SEC_HAS_CONTENTS
);
137 bss
->flags
= SEC_ALLOC
;
139 /* The virtual memory addresses of the sections */
140 text
->vma
= aux_hdrp
->exec_tmem
;
141 data
->vma
= aux_hdrp
->exec_dmem
;
142 bss
->vma
= aux_hdrp
->exec_bfill
;
144 /* The file offsets of the sections */
145 text
->filepos
= aux_hdrp
->exec_tfile
;
146 data
->filepos
= aux_hdrp
->exec_dfile
;
148 /* The file offsets of the relocation info */
149 text
->rel_filepos
= 0;
150 data
->rel_filepos
= 0;
152 /* The file offsets of the string table and symbol table. */
153 obj_sym_filepos (abfd
) = file_hdrp
->symbol_location
;
154 bfd_get_symcount (abfd
) = file_hdrp
->symbol_total
;
155 obj_str_filepos (abfd
) = file_hdrp
->symbol_strings_location
;
156 obj_stringtab_size (abfd
) = file_hdrp
->symbol_strings_size
;
161 /* Create a new BFD section for NAME. If NAME already exists, then create a
162 new unique name, with NAME as the prefix. This exists because SOM .o files
163 created by the native compiler can have a $CODE$ section for each
168 make_unique_section (abfd
, name
, num
)
177 sect
= bfd_make_section (abfd
, name
);
180 sprintf (altname
, "%s-%d", name
, num
++);
181 sect
= bfd_make_section (abfd
, altname
);
184 newname
= bfd_alloc (abfd
, strlen (sect
->name
) + 1);
185 strcpy (newname
, sect
->name
);
187 sect
->name
= newname
;
191 /* Convert all of the space and subspace info into BFD sections. Each space
192 contains a number of subspaces, which in turn describe the mapping between
193 regions of the exec file, and the address space that the program runs in.
194 BFD sections which correspond to spaces will overlap the sections for the
195 associated subspaces. */
198 setup_sections (abfd
, file_hdr
)
200 struct header
*file_hdr
;
205 /* First, read in space names */
207 space_strings
= alloca (file_hdr
->space_strings_size
);
211 if (bfd_seek (abfd
, file_hdr
->space_strings_location
, SEEK_SET
) < 0)
213 if (bfd_read (space_strings
, 1, file_hdr
->space_strings_size
, abfd
)
214 != file_hdr
->space_strings_size
)
217 /* Loop over all of the space dictionaries, building up sections */
219 for (space_index
= 0; space_index
< file_hdr
->space_total
; space_index
++)
221 struct space_dictionary_record space
;
222 struct subspace_dictionary_record subspace
;
223 int subspace_index
, tmp
;
224 asection
*space_asect
;
226 /* Read the space dictionary element */
227 if (bfd_seek (abfd
, file_hdr
->space_location
228 + space_index
* sizeof space
, SEEK_SET
) < 0)
230 if (bfd_read (&space
, 1, sizeof space
, abfd
) != sizeof space
)
233 /* Setup the space name string */
234 space
.name
.n_name
= space
.name
.n_strx
+ space_strings
;
236 /* Make a section out of it */
237 space_asect
= make_unique_section (abfd
, space
.name
.n_name
, space_index
);
241 /* Now, read in the first subspace for this space */
242 if (bfd_seek (abfd
, file_hdr
->subspace_location
243 + space
.subspace_index
* sizeof subspace
,
246 if (bfd_read (&subspace
, 1, sizeof subspace
, abfd
) != sizeof subspace
)
248 /* Seek back to the start of the subspaces for loop below */
249 if (bfd_seek (abfd
, file_hdr
->subspace_location
250 + space
.subspace_index
* sizeof subspace
,
254 /* Setup the section flags as appropriate (this is somewhat bogus, as
255 there isn't a clear mapping between what's in the space record, and
256 what BFD can describe here). */
257 if (space
.is_loadable
)
258 space_asect
->flags
|= SEC_ALLOC
;
259 if (space
.is_defined
)
260 space_asect
->flags
|= SEC_LOAD
;
262 /* Setup the start address and file loc from the first subspace record */
263 space_asect
->vma
= subspace
.subspace_start
;
264 space_asect
->filepos
= subspace
.file_loc_init_value
;
265 space_asect
->alignment_power
= subspace
.alignment
;
267 /* Loop over the rest of the subspaces, building up more sections */
268 for (subspace_index
= 0; subspace_index
< space
.subspace_quantity
;
271 asection
*subspace_asect
;
273 /* Read in the next subspace */
274 if (bfd_read (&subspace
, 1, sizeof subspace
, abfd
)
278 /* Setup the subspace name string */
279 subspace
.name
.n_name
= subspace
.name
.n_strx
+ space_strings
;
281 /* Make a section out of this subspace */
282 subspace_asect
= make_unique_section (abfd
, subspace
.name
.n_name
,
283 space
.subspace_index
+ subspace_index
);
288 if (subspace
.is_loadable
)
289 subspace_asect
->flags
|= SEC_ALLOC
| SEC_LOAD
;
290 if (subspace
.code_only
)
291 subspace_asect
->flags
|= SEC_CODE
;
293 subspace_asect
->vma
= subspace
.subspace_start
;
294 subspace_asect
->_cooked_size
= subspace
.subspace_length
;
295 subspace_asect
->_raw_size
= subspace
.initialization_length
;
296 subspace_asect
->alignment_power
= subspace
.alignment
;
297 subspace_asect
->filepos
= subspace
.file_loc_init_value
;
300 /* Setup the sizes for the space section based upon the info in the
301 last subspace of the space. */
302 space_asect
->_cooked_size
= (subspace
.subspace_start
- space_asect
->vma
)
303 + subspace
.subspace_length
;
304 space_asect
->_raw_size
= (subspace
.file_loc_init_value
305 - space_asect
->filepos
)
306 + subspace
.initialization_length
;
314 struct header file_hdr
;
315 struct som_exec_auxhdr aux_hdr
;
317 if (bfd_read ((PTR
) & file_hdr
, 1, FILE_HDR_SIZE
, abfd
) != FILE_HDR_SIZE
)
320 if (!_PA_RISC_ID (file_hdr
.system_id
))
322 bfd_error
= wrong_format
;
326 switch (file_hdr
.a_magic
)
328 case RELOC_MAGIC
: /* I'm not really sure about all of these types... */
340 bfd_error
= wrong_format
;
344 if (file_hdr
.version_id
!= VERSION_ID
345 && file_hdr
.version_id
!= NEW_VERSION_ID
)
347 bfd_error
= wrong_format
;
351 if (bfd_read ((PTR
) & aux_hdr
, 1, AUX_HDR_SIZE
, abfd
) != AUX_HDR_SIZE
)
352 bfd_error
= wrong_format
;
354 if (!setup_sections (abfd
, &file_hdr
))
357 return hppa_object_setup (abfd
, &file_hdr
, &aux_hdr
);
364 fprintf (stderr
, "hppa_mkobject unimplemented\n");
371 hppa_write_object_contents(abfd
)
374 fprintf (stderr
, "hppa_write_object_contents unimplemented\n");
381 hppa_get_symtab_upper_bound (abfd
)
384 fprintf (stderr
, "hppa_get_symtab_upper_bound unimplemented\n");
391 hppa_get_reloc_upper_bound (abfd
, asect
)
395 fprintf (stderr
, "hppa_get_reloc_upper_bound unimplemented\n");
402 hppa_canonicalize_reloc (abfd
, section
, relptr
, symbols
)
408 fprintf (stderr
, "hppa_canonicalize_reloc unimplemented\n");
413 extern bfd_target hppa_vec
;
416 hppa_get_symtab (abfd
, location
)
420 fprintf (stderr
, "hppa_get_symtab unimplemented\n");
427 hppa_make_empty_symbol (abfd
)
430 hppa_symbol_type
*new =
431 (hppa_symbol_type
*) bfd_zalloc (abfd
, sizeof (hppa_symbol_type
));
432 new->symbol
.the_bfd
= abfd
;
438 hppa_print_symbol (ignore_abfd
, afile
, symbol
, how
)
442 bfd_print_symbol_type how
;
444 fprintf (stderr
, "hppa_print_symbol unimplemented\n");
450 hppa_new_section_hook (abfd
, newsect
)
454 newsect
->alignment_power
= 3;
456 /* We allow more than three sections internally */
461 hppa_set_section_contents (abfd
, section
, location
, offset
, count
)
468 fprintf (stderr
, "hppa_set_section_contents unimplimented\n");
475 hppa_set_arch_mach (abfd
, arch
, machine
)
477 enum bfd_architecture arch
;
478 unsigned long machine
;
480 fprintf (stderr
, "hppa_set_arch_mach unimplemented\n");
482 /* Allow any architecture to be supported by the hppa backend */
483 return bfd_default_set_arch_mach (abfd
, arch
, machine
);
487 hppa_find_nearest_line (abfd
, section
, symbols
, offset
, filename_ptr
,
488 functionname_ptr
, line_ptr
)
493 CONST
char **filename_ptr
;
494 CONST
char **functionname_ptr
;
495 unsigned int *line_ptr
;
497 fprintf (stderr
, "hppa_find_nearest_line unimplemented\n");
504 hppa_sizeof_headers (abfd
, reloc
)
508 fprintf (stderr
, "hppa_sizeof_headers unimplemented\n");
515 make_bfd_asection (abfd
, name
, flags
, _raw_size
, vma
, alignment_power
)
519 bfd_size_type _raw_size
;
521 unsigned int alignment_power
;
525 asect
= bfd_make_section (abfd
, name
);
529 asect
->flags
= flags
;
530 asect
->_raw_size
= _raw_size
;
532 asect
->filepos
= bfd_tell (abfd
);
533 asect
->alignment_power
= alignment_power
;
538 #if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD)
539 /* This requires system include files. */
542 hppa_core_file_p (abfd
)
545 core_hdr (abfd
) = bfd_zalloc (abfd
, sizeof (struct hppa_core_struct
));
546 if (!core_hdr (abfd
))
552 struct corehead core_header
;
554 val
= bfd_read ((void *) &core_header
, 1, sizeof core_header
, abfd
);
557 switch (core_header
.type
)
561 bfd_seek (abfd
, core_header
.len
, SEEK_CUR
); /* Just skip this */
565 struct proc_exec proc_exec
;
566 bfd_read ((void *) &proc_exec
, 1, core_header
.len
, abfd
);
567 strncpy (core_command (abfd
), proc_exec
.cmd
, MAXCOMLEN
+ 1);
572 struct proc_info proc_info
;
573 core_regsec (abfd
) = make_bfd_asection (abfd
, ".reg",
574 SEC_ALLOC
+ SEC_HAS_CONTENTS
,
576 (int) &proc_info
- (int) &proc_info
.hw_regs
,
578 bfd_read (&proc_info
, 1, core_header
.len
, abfd
);
579 core_signal (abfd
) = proc_info
.sig
;
581 if (!core_regsec (abfd
))
585 core_datasec (abfd
) = make_bfd_asection (abfd
, ".data",
586 SEC_ALLOC
+ SEC_LOAD
+ SEC_HAS_CONTENTS
,
590 if (!core_datasec (abfd
))
592 bfd_seek (abfd
, core_header
.len
, SEEK_CUR
);
595 core_stacksec (abfd
) = make_bfd_asection (abfd
, ".stack",
596 SEC_ALLOC
+ SEC_LOAD
+ SEC_HAS_CONTENTS
,
600 if (!core_stacksec (abfd
))
602 bfd_seek (abfd
, core_header
.len
, SEEK_CUR
);
605 fprintf (stderr
, "Unknown HPPA/HPUX core file section type %d\n",
607 bfd_seek (abfd
, core_header
.len
, SEEK_CUR
);
612 /* OK, we believe you. You're a core file (sure, sure). */
618 hppa_core_file_failing_command (abfd
)
621 return core_command (abfd
);
626 hppa_core_file_failing_signal (abfd
)
629 return core_signal (abfd
);
634 hppa_core_file_matches_executable_p (core_bfd
, exec_bfd
)
635 bfd
*core_bfd
, *exec_bfd
;
637 return true; /* FIXME, We have no way of telling at this point */
640 #endif /* HPUX or BSD. */
642 /* Miscellaneous Support Functions -- Control Structures and Functions
649 return (((x
& 1) << 2) | ((x
& 6) >> 1)) & 7;
653 dis_assemble_3 (x
, r
)
657 *r
= (((x
& 4) >> 2) | ((x
& 3) << 1)) & 7;
664 return (((y
& 1) << 11) | ((x
& 1) << 10) | ((x
& 0x7fe) >> 1)) & 0xfff;
668 dis_assemble_12 (as12
, x
, y
)
672 *y
= (as12
& 0x800) >> 11;
673 *x
= ((as12
& 0x3ff) << 1) | ((as12
& 0x400) >> 10);
677 assemble_17 (x
, y
, z
)
678 unsigned int x
, y
, z
;
682 temp
= ((z
& 1) << 16) |
686 return temp
& 0x1ffff;
690 dis_assemble_17 (as17
, x
, y
, z
)
692 unsigned int *x
, *y
, *z
;
695 *z
= (as17
& 0x10000) >> 16;
696 *x
= (as17
& 0x0f800) >> 11;
697 *y
= (((as17
& 0x00400) >> 10) | ((as17
& 0x3ff) << 1)) & 0x7ff;
706 temp
= ((x
& 1) << 20) |
708 ((x
& 0xc000) >> 7) |
709 ((x
& 0x1f0000) >> 14) |
710 ((x
& 0x003000) >> 12);
711 return temp
& 0x1fffff;
715 dis_assemble_21 (as21
, x
)
716 unsigned int as21
, *x
;
721 temp
= (as21
& 0x100000) >> 20;
722 temp
|= (as21
& 0x0ffe00) >> 8;
723 temp
|= (as21
& 0x000180) << 7;
724 temp
|= (as21
& 0x00007c) << 14;
725 temp
|= (as21
& 0x000003) << 12;
736 unsigned int len_ones
;
743 len_ones
= (len_ones
<< 1) | 1;
747 sign
= (x
>> (len
- 1)) & 1;
750 result
= (~0 ^ len_ones
) | (len_ones
& x
);
752 result
= len_ones
& x
;
762 return (x
<< (32 - len
)) >> (32 - len
);
769 unsigned int len_ones
;
776 len_ones
= (len_ones
<< 1) | 1;
784 sign_unext (x
, len
, result
)
786 unsigned int *result
;
788 unsigned int len_ones
;
790 len_ones
= ones (len
);
792 *result
= x
& len_ones
;
796 low_sign_ext (x
, len
)
799 unsigned int temp1
, temp2
;
800 unsigned int len_ones
;
802 len_ones
= ones (len
);
804 temp1
= (x
& 1) << (len
- 1);
805 temp2
= ((x
& 0xfffffffe) & len_ones
) >> 1;
806 return sign_ext ((temp1
| temp2
), len
);
810 low_sign_unext (x
, len
, result
)
812 unsigned int *result
;
817 unsigned int one_bit_at_len
;
818 unsigned int len_ones
;
820 len_ones
= ones (len
);
821 one_bit_at_len
= 1 << (len
- 1);
823 sign_unext (x
, len
, &temp
);
824 sign
= temp
& one_bit_at_len
;
827 rest
= temp
& (len_ones
^ one_bit_at_len
);
830 *result
= rest
| sign
;
833 /* These work when 'y' is a power of two only. */
846 return (x
+ y
/ 2) & ~(y
- 1);
853 return x
- (x
| ~(y
- 1));
856 /* L(Symbol, Addend): */
857 /* round_down (Symbol + Addend, 2048) */
862 return (round_down (Symbol
+ Addend
, 2048)) >> 11;
865 /* R(Symbol, Addend): */
866 /* Symbol + Addend - round_down (Symbol + Addend, 2048) */
871 return Symbol
+ Addend
- round_down (Symbol
+ Addend
, 2048);
874 /* LS(Symbol, Addend): */
875 /* round (Symbol + Addend, 2048) */
880 return round (Symbol
+ Addend
, 2048);
883 /* RS(Symbol, Addend): */
884 /* Symbol + Addend - round (Symbol + Addend, 2048) */
889 return Symbol
+ Addend
- round (Symbol
+ Addend
, 2048);
892 /* LD(Symbol, Addend): */
893 /* round_up (Symbol + Addend, 2048) */
898 return (round_up (Symbol
+ Addend
, 2048)) >> 11;
901 /* RD(Symbol, Addend): */
902 /* Symbol + Addend - round_up (Symbol + Addend, 2048) */
907 return Symbol
+ Addend
- round_up (Symbol
+ Addend
, 2048);
910 /* LR(Symbol, Addend): */
911 /* round_down (Symbol, 2048) + round (Addend, 8192) */
916 return (round_down (Symbol
, 2048) + round (Addend
, 8192)) >> 11;
919 /* RR(Symbol, Addend): */
920 /* Symbol - round_down (Symbol, 2048) + */
921 /* Addend - round (Addend, 8192) */
927 - round_down (Symbol
, 2048)
928 + Addend
- round (Addend
, 8192);
932 hppa_field_adjust (value
, constant_value
, r_field
)
934 unsigned long constant_value
;
935 unsigned short r_field
;
937 unsigned long init_value
= value
;
938 value
+= constant_value
;
941 case e_fsel
: /* F : no change */
944 case e_lssel
: /* LS : if (bit 21) then add 0x800
945 arithmetic shift right 11 bits */
946 if (value
& 0x00000400)
948 value
= (value
& 0xfffff800) >> 11;
949 BFD_ASSERT (value
== LS (init_value
, constant_value
));
952 case e_rssel
: /* RS : Sign extend from bit 21 */
953 if (value
& 0x00000400)
957 BFD_ASSERT (value
== RS (init_value
, constant_value
));
960 case e_lsel
: /* L : Arithmetic shift right 11 bits */
961 value
= (value
& 0xfffff800) >> 11;
962 BFD_ASSERT (value
== L (init_value
, constant_value
));
965 case e_rsel
: /* R : Set bits 0-20 to zero */
966 value
= value
& 0x7ff;
967 BFD_ASSERT (value
== R (init_value
, constant_value
));
970 case e_ldsel
: /* LD : Add 0x800, arithmetic shift
973 value
= (value
& 0xfffff800) >> 11;
974 BFD_ASSERT (value
== LD (init_value
, constant_value
));
977 case e_rdsel
: /* RD : Set bits 0-20 to one */
979 BFD_ASSERT (value
== RD (init_value
, constant_value
));
982 case e_lrsel
: /* LR : L with "rounded" constant */
983 value
= value
+ ((constant_value
+ 0x1000) & 0xffffe000);
984 value
= (value
& 0xfffff800) >> 11;
985 BFD_ASSERT (value
== LR (init_value
, constant_value
));
988 case e_rrsel
: /* RR : R with "rounded" constant */
989 value
= value
+ ((constant_value
+ 0x1000) & 0xffffe000);
990 value
= (value
& 0x7ff) + constant_value
- ((constant_value
+ 0x1000) & 0xffffe000);
991 BFD_ASSERT (value
== RR (init_value
, constant_value
));
995 fprintf (stderr
, "Unrecognized field_selector 0x%02x\n", r_field
);
1002 /* Return information about SOM symbol SYMBOL in RET. */
1005 hppa_get_symbol_info (ignore_abfd
, symbol
, ret
)
1006 bfd
*ignore_abfd
; /* Ignored. */
1010 bfd_symbol_info (symbol
, ret
);
1013 /* End of miscellaneous support functions. */
1015 #define hppa_bfd_debug_info_start bfd_void
1016 #define hppa_bfd_debug_info_end bfd_void
1017 #define hppa_bfd_debug_info_accumulate (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
1019 #define hppa_openr_next_archived_file bfd_generic_openr_next_archived_file
1020 #define hppa_generic_stat_arch_elt bfd_generic_stat_arch_elt
1021 #define hppa_slurp_armap bfd_false
1022 #define hppa_slurp_extended_name_table _bfd_slurp_extended_name_table
1023 #define hppa_truncate_arname (void (*)())bfd_nullvoidptr
1024 #define hppa_write_armap 0
1026 #define hppa_get_lineno (struct lineno_cache_entry *(*)())bfd_nullvoidptr
1027 #define hppa_close_and_cleanup bfd_generic_close_and_cleanup
1028 #define hppa_get_section_contents bfd_generic_get_section_contents
1030 #define hppa_bfd_get_relocated_section_contents \
1031 bfd_generic_get_relocated_section_contents
1032 #define hppa_bfd_relax_section bfd_generic_relax_section
1033 #define hppa_bfd_seclet_link bfd_generic_seclet_link
1034 #define hppa_bfd_reloc_type_lookup \
1035 ((CONST struct reloc_howto_struct *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) bfd_nullvoidptr)
1036 #define hppa_bfd_make_debug_symbol \
1037 ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
1039 bfd_target hppa_vec
=
1042 bfd_target_hppa_flavour
,
1043 true, /* target byte order */
1044 true, /* target headers byte order */
1045 (HAS_RELOC
| EXEC_P
| /* object flags */
1046 HAS_LINENO
| HAS_DEBUG
|
1047 HAS_SYMS
| HAS_LOCALS
| DYNAMIC
| WP_TEXT
| D_PAGED
),
1048 (SEC_CODE
| SEC_DATA
| SEC_ROM
| SEC_HAS_CONTENTS
1049 | SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
), /* section flags */
1051 /* leading_symbol_char: is the first char of a user symbol
1052 predictable, and if so what is it */
1054 ' ', /* ar_pad_char */
1055 16, /* ar_max_namelen */
1056 3, /* minimum alignment */
1057 _do_getb64
, _do_getb_signed_64
, _do_putb64
,
1058 _do_getb32
, _do_getb_signed_32
, _do_putb32
,
1059 _do_getb16
, _do_getb_signed_16
, _do_putb16
, /* data */
1060 _do_getb64
, _do_getb_signed_64
, _do_putb64
,
1061 _do_getb32
, _do_getb_signed_32
, _do_putb32
,
1062 _do_getb16
, _do_getb_signed_16
, _do_putb16
, /* hdrs */
1064 hppa_object_p
, /* bfd_check_format */
1065 bfd_generic_archive_p
,
1071 _bfd_generic_mkarchive
,
1076 hppa_write_object_contents
,
1077 _bfd_write_archive_contents
,
1085 #endif /* HOST_HPPAHPUX || HOST_HPPABSD */