* som.c (bfd_som_set_section_attributes): New function.
(bfd_som_set_subsection_attributes): Likewise. (bfd_som_set_symboL_type): Likewise. (bfd_som_attach_unwind_info): Likewise. * som.h: Declare new exported functions.
This commit is contained in:
parent
176ed088ef
commit
40249bfb73
@ -1,3 +1,18 @@
|
||||
Fri Nov 12 15:29:36 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
|
||||
|
||||
* som.c (bfd_som_set_section_attributes): New function.
|
||||
(bfd_som_set_subsection_attributes): Likewise.
|
||||
(bfd_som_set_symboL_type): Likewise.
|
||||
(bfd_som_attach_unwind_info): Likewise.
|
||||
* som.h: Declare new exported functions.
|
||||
|
||||
* som.h (struct som_symbol): Add new fields to hold additional
|
||||
information needed to build/write symbol tables and fixup streams.
|
||||
(struct som_section_data_struct): Add new fields to hold additional
|
||||
information needed to build/write space and subspace headers.
|
||||
(som_symbol_data): New accessor macro for SOM symbol information.
|
||||
(R_HPPA_*): Basic relocation types to be used by the assembler.
|
||||
|
||||
Fri Nov 12 11:00:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* trad-core.c (trad_unix_core_file_p): If new hook
|
||||
|
74
bfd/som.c
74
bfd/som.c
@ -103,7 +103,9 @@ static int log2 PARAMS ((unsigned int));
|
||||
|
||||
|
||||
/* Return the logarithm of X, base 2, considering X unsigned.
|
||||
Abort if X is not a power of two -- this should never happen. */
|
||||
Abort if X is not a power of two -- this should never happen (FIXME:
|
||||
It will happen on corrupt executables. GDB should give an error, not
|
||||
a coredump, in that case). */
|
||||
|
||||
static int
|
||||
log2 (x)
|
||||
@ -829,6 +831,74 @@ som_new_section_hook (abfd, newsect)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Set backend info for sections which can not be described
|
||||
in the BFD data structures. */
|
||||
|
||||
void
|
||||
bfd_som_set_section_attributes (section, defined, private, sort_key, spnum)
|
||||
asection *section;
|
||||
char defined;
|
||||
char private;
|
||||
unsigned char sort_key;
|
||||
int spnum;
|
||||
{
|
||||
struct space_dictionary_record *space_dict;
|
||||
|
||||
som_section_data (section)->is_space = 1;
|
||||
space_dict = &som_section_data (section)->space_dict;
|
||||
space_dict->is_defined = defined;
|
||||
space_dict->is_private = private;
|
||||
space_dict->sort_key = sort_key;
|
||||
space_dict->space_number = spnum;
|
||||
}
|
||||
|
||||
/* Set backend info for subsections which can not be described
|
||||
in the BFD data structures. */
|
||||
|
||||
void
|
||||
bfd_som_set_subsection_attributes (section, container, access,
|
||||
sort_key, quadrant)
|
||||
asection *section;
|
||||
asection *container;
|
||||
int access;
|
||||
unsigned char sort_key;
|
||||
int quadrant;
|
||||
{
|
||||
struct subspace_dictionary_record *subspace_dict;
|
||||
som_section_data (section)->is_subspace = 1;
|
||||
subspace_dict = &som_section_data (section)->subspace_dict;
|
||||
subspace_dict->access_control_bits = access;
|
||||
subspace_dict->sort_key = sort_key;
|
||||
subspace_dict->quadrant = quadrant;
|
||||
som_section_data (section)->containing_space = container;
|
||||
}
|
||||
|
||||
/* Set the full SOM symbol type. SOM needs far more symbol information
|
||||
than any other object file format I'm aware of. It is mandatory
|
||||
to be able to know if a symbol is an entry point, millicode, data,
|
||||
code, absolute, storage request, or procedure label. If you get
|
||||
the symbol type wrong your program will not link. */
|
||||
|
||||
void
|
||||
bfd_som_set_symbol_type (symbol, type)
|
||||
asymbol *symbol;
|
||||
unsigned int type;
|
||||
{
|
||||
(*som_symbol_data (symbol))->som_type = type;
|
||||
}
|
||||
|
||||
/* Attach 64bits of unwind information to a symbol (which hopefully
|
||||
is a function of some kind!). It would be better to keep this
|
||||
in the R_ENTRY relocation, but there is not enough space. */
|
||||
|
||||
void
|
||||
bfd_som_attach_unwind_info (symbol, unwind_desc)
|
||||
asymbol *symbol;
|
||||
char *unwind_desc;
|
||||
{
|
||||
(*som_symbol_data (symbol))->unwind = unwind_desc;
|
||||
}
|
||||
|
||||
static boolean
|
||||
som_set_section_contents (abfd, section, location, offset, count)
|
||||
bfd *abfd;
|
||||
@ -933,7 +1003,7 @@ bfd_target som_vec =
|
||||
true, /* target headers byte order */
|
||||
(HAS_RELOC | EXEC_P | /* object flags */
|
||||
HAS_LINENO | HAS_DEBUG |
|
||||
HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
|
||||
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
|
||||
(SEC_CODE | SEC_DATA | SEC_ROM | SEC_HAS_CONTENTS
|
||||
| SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user