X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fsom.h;h=bf983c124657d539d77c8b4f82770e6afa451c8c;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=4f79145ffb07df2fbaeca40f65a1c9cda6aa6c3b;hpb=116c20d240af833e0a1f1f959951f57b6e465782;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/som.h b/bfd/som.h index 4f79145ffb..bf983c1246 100644 --- a/bfd/som.h +++ b/bfd/som.h @@ -1,6 +1,5 @@ /* HP PA-RISC SOM object file format: definitions internal to BFD. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, - 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by the Center for Software Science at the University of Utah (pa-gdb-bugs@cs.utah.edu). @@ -9,7 +8,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -19,8 +18,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ #ifndef _SOM_H #define _SOM_H @@ -30,9 +29,9 @@ /* We want reloc.h to provide PA 2.0 defines. */ #define PA_2_0 -#include -#include -#include +#include "som/aout.h" +#include "som/lst.h" +#include "som/internal.h" /* The SOM BFD backend doesn't currently use anything from these two include files, but it's likely to need them in the future. */ @@ -41,7 +40,11 @@ #include #endif -#if defined(HOST_HPPABSD) || defined (HOST_HPPAOSF) +#ifdef __cplusplus +extern "C" { +#endif + +#if defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) /* BSD uses a completely different scheme for object file identification. so for now, define _PA_RISC_ID to accept any random value for a model number. */ @@ -49,9 +52,6 @@ #define _PA_RISC_ID(__m_num) 1 #endif /* HOST_HPPABSD */ -#define FILE_HDR_SIZE sizeof (struct header) -#define AUX_HDR_SIZE sizeof (struct som_exec_auxhdr) - typedef struct som_symbol { asymbol symbol; @@ -66,7 +66,7 @@ typedef struct som_symbol unsigned int hppa_arg_reloc; unsigned int hppa_priv_level; } ap; - PTR any; + void * any; } tc_data; @@ -116,11 +116,11 @@ struct somdata /* These three fields are only used when writing files and are generated from scratch. They need not be copied for objcopy or strip to work. */ - struct header *file_hdr; - struct copyright_aux_hdr *copyright_aux_hdr; - struct user_string_aux_hdr *version_aux_hdr; + struct som_header *file_hdr; + struct som_string_auxhdr *copyright_aux_hdr; + struct som_string_auxhdr *version_aux_hdr; struct som_exec_auxhdr *exec_hdr; - COMPUNIT *comp_unit; + struct som_compilation_unit *comp_unit; /* Pointers to a saved copy of the symbol and string tables. These need not be copied for objcopy or strip to work. */ @@ -136,6 +136,7 @@ struct somdata file_ptr str_filepos; file_ptr reloc_filepos; unsigned stringtab_size; + void * line_info; }; struct som_data_struct @@ -143,35 +144,6 @@ struct som_data_struct struct somdata a; }; -struct som_subspace_dictionary_record -{ - int space_index; - unsigned int access_control_bits : 7; - unsigned int memory_resident : 1; - unsigned int dup_common : 1; - unsigned int is_common : 1; - unsigned int is_loadable : 1; - unsigned int quadrant : 2; - unsigned int initially_frozen : 1; - unsigned int is_first : 1; - unsigned int code_only : 1; - unsigned int sort_key : 8; - unsigned int replicate_init : 1; - unsigned int continuation : 1; - unsigned int is_tspecific : 1; - unsigned int is_comdat : 1; - unsigned int reserved : 4; - int file_loc_init_value; - unsigned int initialization_length; - unsigned int subspace_start; - unsigned int subspace_length; - unsigned int reserved2 : 5; - unsigned int alignment :27; - union name_pt name; - int fixup_request_index; - unsigned int fixup_request_quantity; -}; - /* Substructure of som_section_data_struct used to hold information which can't be represented by the generic BFD section structure, but which must be copied during objcopy or strip. */ @@ -214,8 +186,8 @@ struct som_section_data_struct { struct som_copyable_section_data_struct *copy_data; unsigned int reloc_size; - char *reloc_stream; - struct space_dictionary_record *space_dict; + unsigned char *reloc_stream; + struct som_space_dictionary_record *space_dict; struct som_subspace_dictionary_record *subspace_dict; }; @@ -233,7 +205,7 @@ struct som_section_data_struct #define obj_som_stringtab_size(bfd) (somdata (bfd).stringtab_size) #define obj_som_reloc_filepos(bfd) (somdata (bfd).reloc_filepos) #define obj_som_sorted_syms(bfd) (somdata (bfd).sorted_syms) -#define som_section_data(sec) ((struct som_section_data_struct *) sec->used_by_bfd) +#define som_section_data(sec) ((struct som_section_data_struct *) sec->used_by_bfd) #define som_symbol_data(symbol) ((som_symbol_type *) symbol) /* Defines groups of basic relocations. FIXME: These should @@ -261,9 +233,13 @@ struct som_section_data_struct /* Exported functions, mostly for use by GAS. */ bfd_boolean bfd_som_set_section_attributes (asection *, int, int, unsigned int, int); bfd_boolean bfd_som_set_subsection_attributes (asection *, asection *, int, unsigned int, int, int, int, int); -void bfd_som_set_symbol_type (asymbol *, unsigned int); -bfd_boolean bfd_som_attach_aux_hdr (bfd *, int, char *); -int ** hppa_som_gen_reloc_type (bfd *, int, int, enum hppa_reloc_field_selector_type_alt, int, asymbol *); +void bfd_som_set_symbol_type (asymbol *, unsigned int); +bfd_boolean bfd_som_attach_aux_hdr (bfd *, int, char *); +int ** hppa_som_gen_reloc_type (bfd *, int, int, enum hppa_reloc_field_selector_type_alt, int, asymbol *); bfd_boolean bfd_som_attach_compilation_unit (bfd *, const char *, const char *, const char *, const char *); +asection * bfd_section_from_som_symbol (bfd *abfd, struct som_external_symbol_dictionary_record *symbol); +#ifdef __cplusplus +} +#endif #endif /* _SOM_H */