From ae880afc1beee25a37e48088ebe1bf13710d390b Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 14 Sep 1994 03:03:15 +0000 Subject: [PATCH] * som.c (som_fixup_formats): Case R_ENTRY (0xb3), set both 'T' and 'U' to grab all the unwind information. (som_set_reloc_info): Make 'U' unwind bits persist across multiple SOM relocations. Set the addend field of an R_ENTRY relocation to the value in 'T'; set the addend field on an R_EXIT relocation to the value in 'U'. --- bfd/ChangeLog | 7 +++++++ bfd/som.c | 21 +++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bfcc4919726..03ce7619cd0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,12 @@ Tue Sep 13 17:57:00 1994 Jeff Law (law@snake.cs.utah.edu) + * som.c (som_fixup_formats): Case R_ENTRY (0xb3), set both + 'T' and 'U' to grab all the unwind information. + (som_set_reloc_info): Make 'U' unwind bits persist across + multiple SOM relocations. Set the addend field of an R_ENTRY + relocation to the value in 'T'; set the addend field on an + R_EXIT relocation to the value in 'U'. + * som.h (som_symbol_type): Delete unwind field. * som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of diff --git a/bfd/som.c b/bfd/som.c index 871595b2dec..0c63652772a 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -329,7 +329,8 @@ static const struct section_to_type stt[] = { O = stack operation R = parameter relocation bits S = symbol index - U = 64 bits of stack unwind and frame size info (we only keep 32 bits) + T = first 32 bits of stack unwind information + U = second 32 bits of stack unwind information V = a literal constant (usually used in the next relocation) P = a previous relocation @@ -570,7 +571,7 @@ static const struct fixup_format som_fixup_formats[256] = /* R_BREAKPOINT */ 0, "L4=", /* 0xb2 */ /* R_ENTRY */ - 0, "Ui=", /* 0xb3 */ + 0, "Te=Ue=", /* 0xb3 */ 1, "Uf=", /* 0xb4 */ /* R_ALT_ENTRY */ 0, "", /* 0xb5 */ @@ -3993,7 +3994,7 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count) const struct fixup_format *fp; char *cp; unsigned char *save_fixup; - int variables[26], stack[20], c, v, count, prev_fixup, *sp; + int variables[26], stack[20], c, v, count, prev_fixup, *sp, saved_unwind_bits; const int *subop; arelent *rptr= internal_relocs; unsigned int offset = 0; @@ -4008,6 +4009,7 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count) memset (stack, 0, sizeof (stack)); count = 0; prev_fixup = 0; + saved_unwind_bits = 0; sp = stack; while (fixup < end_fixups) @@ -4051,6 +4053,7 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count) into D. */ var ('L') = 0; var ('D') = fp->D; + var ('U') = saved_unwind_bits; /* Get the opcode format. */ cp = fp->format; @@ -4160,6 +4163,11 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count) ++subop; --subop; break; + /* The lower 32unwind bits must be persistent. */ + case 'U': + saved_unwind_bits = var ('U'); + break; + default: break; } @@ -4183,7 +4191,12 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count) /* Done with a single reloction. Loop back to the top. */ if (! just_count) { - rptr->addend = var ('V'); + if (som_hppa_howto_table[op].type == R_ENTRY) + rptr->addend = var ('T'); + else if (som_hppa_howto_table[op].type == R_EXIT) + rptr->addend = var ('U'); + else + rptr->addend = var ('V'); rptr++; } count++; -- 2.30.2