aboutsummaryrefslogtreecommitdiff
path: root/bfd/som.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1993-11-12 23:43:24 +0000
committerJeff Law <law@redhat.com>1993-11-12 23:43:24 +0000
commit4fdb66cd50b3afe5a77cd717a7526bcfefc4bf4d (patch)
tree4cd2eee23c72a65d2de352a23bb869d539f9b94a /bfd/som.c
parent70f1d7387eaa7cfb8572a117a92b0ae39b7f51e3 (diff)
downloadgdb-4fdb66cd50b3afe5a77cd717a7526bcfefc4bf4d.zip
gdb-4fdb66cd50b3afe5a77cd717a7526bcfefc4bf4d.tar.gz
gdb-4fdb66cd50b3afe5a77cd717a7526bcfefc4bf4d.tar.bz2
* 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.
Diffstat (limited to 'bfd/som.c')
-rw-r--r--bfd/som.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/bfd/som.c b/bfd/som.c
index 707ed92..47d0b48 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 *));