* 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'.
This commit is contained in:
parent
e10639db44
commit
ae880afc1b
2 changed files with 24 additions and 4 deletions
|
@ -1,5 +1,12 @@
|
||||||
Tue Sep 13 17:57:00 1994 Jeff Law (law@snake.cs.utah.edu)
|
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.h (som_symbol_type): Delete unwind field.
|
||||||
|
|
||||||
* som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of
|
* som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of
|
||||||
|
|
21
bfd/som.c
21
bfd/som.c
|
@ -329,7 +329,8 @@ static const struct section_to_type stt[] = {
|
||||||
O = stack operation
|
O = stack operation
|
||||||
R = parameter relocation bits
|
R = parameter relocation bits
|
||||||
S = symbol index
|
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)
|
V = a literal constant (usually used in the next relocation)
|
||||||
P = a previous relocation
|
P = a previous relocation
|
||||||
|
|
||||||
|
@ -570,7 +571,7 @@ static const struct fixup_format som_fixup_formats[256] =
|
||||||
/* R_BREAKPOINT */
|
/* R_BREAKPOINT */
|
||||||
0, "L4=", /* 0xb2 */
|
0, "L4=", /* 0xb2 */
|
||||||
/* R_ENTRY */
|
/* R_ENTRY */
|
||||||
0, "Ui=", /* 0xb3 */
|
0, "Te=Ue=", /* 0xb3 */
|
||||||
1, "Uf=", /* 0xb4 */
|
1, "Uf=", /* 0xb4 */
|
||||||
/* R_ALT_ENTRY */
|
/* R_ALT_ENTRY */
|
||||||
0, "", /* 0xb5 */
|
0, "", /* 0xb5 */
|
||||||
|
@ -3993,7 +3994,7 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
|
||||||
const struct fixup_format *fp;
|
const struct fixup_format *fp;
|
||||||
char *cp;
|
char *cp;
|
||||||
unsigned char *save_fixup;
|
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;
|
const int *subop;
|
||||||
arelent *rptr= internal_relocs;
|
arelent *rptr= internal_relocs;
|
||||||
unsigned int offset = 0;
|
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));
|
memset (stack, 0, sizeof (stack));
|
||||||
count = 0;
|
count = 0;
|
||||||
prev_fixup = 0;
|
prev_fixup = 0;
|
||||||
|
saved_unwind_bits = 0;
|
||||||
sp = stack;
|
sp = stack;
|
||||||
|
|
||||||
while (fixup < end_fixups)
|
while (fixup < end_fixups)
|
||||||
|
@ -4051,6 +4053,7 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
|
||||||
into D. */
|
into D. */
|
||||||
var ('L') = 0;
|
var ('L') = 0;
|
||||||
var ('D') = fp->D;
|
var ('D') = fp->D;
|
||||||
|
var ('U') = saved_unwind_bits;
|
||||||
|
|
||||||
/* Get the opcode format. */
|
/* Get the opcode format. */
|
||||||
cp = fp->format;
|
cp = fp->format;
|
||||||
|
@ -4160,6 +4163,11 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
|
||||||
++subop;
|
++subop;
|
||||||
--subop;
|
--subop;
|
||||||
break;
|
break;
|
||||||
|
/* The lower 32unwind bits must be persistent. */
|
||||||
|
case 'U':
|
||||||
|
saved_unwind_bits = var ('U');
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
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. */
|
/* Done with a single reloction. Loop back to the top. */
|
||||||
if (! just_count)
|
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++;
|
rptr++;
|
||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue