From 4fdb66cd50b3afe5a77cd717a7526bcfefc4bf4d Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 12 Nov 1993 23:43:24 +0000 Subject: [PATCH] * som.c (struct reloc_queue): New structure to keep track of the last four multibyte relocations emitted. (enum pa_symbol_type): Type to fully describe the symbol types associated with .import/.export assembler directives. --- bfd/ChangeLog | 5 +++++ bfd/som.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a50a6f91b7..545dec67d4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ Fri Nov 12 15:29:36 1993 Jeffrey A. Law (law@snake.cs.utah.edu) + * som.c (struct reloc_queue): New structure to keep track of + the last four multibyte relocations emitted. + (enum pa_symbol_type): Type to fully describe the symbol types + associated with .import/.export assembler directives. + * som.c: Include libhppa.h * som.c (bfd_som_set_section_attributes): New function. diff --git a/bfd/som.c b/bfd/som.c index 707ed92583..47d0b48880 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -67,6 +67,35 @@ ((__m_num) >= _PA_RISC1_1_ID && (__m_num) <= _PA_RISC_MAXID)) #endif /* _PA_RISC_ID */ +/* SOM allows any one of the four previous relocations to be reused + with a "R_PREV_FIXUP" relocation entry. Since R_PREV_FIXUP + relocations are always a single byte, using a R_PREV_FIXUP instead + of some multi-byte relocation makes object files smaller. + + Note one side effect of using a R_PREV_FIXUP is the relocation that + is being repeated moves to the front of the queue. */ +struct reloc_queue + { + unsigned char *reloc; + unsigned int size; + } reloc_queue[4]; + +/* This fully describes the symbol types which may be attached to + an EXPORT or IMPORT directive. Only SOM uses this formation + (ELF has no need for it). */ +typedef enum +{ + SYMBOL_TYPE_UNKNOWN, + SYMBOL_TYPE_ABSOLUTE, + SYMBOL_TYPE_CODE, + SYMBOL_TYPE_DATA, + SYMBOL_TYPE_ENTRY, + SYMBOL_TYPE_MILLICODE, + SYMBOL_TYPE_PLABEL, + SYMBOL_TYPE_PRI_PROG, + SYMBOL_TYPE_SEC_PROG, +} pa_symbol_type; + /* Forward declarations */ static boolean som_mkobject PARAMS ((bfd *)); -- 2.34.1