mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
* som.h (som_symbol_type): Delete unwind field.
* som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of unwind information from the addend field of the R_ENTRY, get the other 32bits from the addend field of the R_EXIT. (bfd_som_attach_unwind_info): Delete function and all references.
This commit is contained in:
@ -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.h (som_symbol_type): Delete unwind field.
|
||||||
|
|
||||||
|
* som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of
|
||||||
|
unwind information from the addend field of the R_ENTRY, get the
|
||||||
|
other 32bits from the addend field of the R_EXIT.
|
||||||
|
(bfd_som_attach_unwind_info): Delete function and all references.
|
||||||
|
|
||||||
* som.h (som_symbol_type): Delete unused a.out-related fields.
|
* som.h (som_symbol_type): Delete unused a.out-related fields.
|
||||||
|
|
||||||
* som.c (bfd_section_from_som_symbol): Use bfd_abs_section_ptr
|
* som.c (bfd_section_from_som_symbol): Use bfd_abs_section_ptr
|
||||||
|
47
bfd/som.c
47
bfd/som.c
@ -2536,25 +2536,30 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
|
|||||||
|
|
||||||
case R_ENTRY:
|
case R_ENTRY:
|
||||||
{
|
{
|
||||||
int *descp = (int *)
|
int tmp;
|
||||||
som_symbol_data (*bfd_reloc->sym_ptr_ptr)->unwind;
|
arelent *tmp_reloc;
|
||||||
bfd_put_8 (abfd, R_ENTRY, p);
|
bfd_put_8 (abfd, R_ENTRY, p);
|
||||||
|
|
||||||
/* FIXME: We should set the sym_ptr for the R_ENTRY
|
/* R_ENTRY relocations have 64 bits of associated
|
||||||
reloc to point to the appropriate function symbol,
|
data. Unfortunately the addend field of a bfd
|
||||||
and attach unwind bits to the function symbol as
|
relocation is only 32 bits. So, we split up
|
||||||
we canonicalize the relocs. Doing so would ensure
|
the 64bit unwind information and store part in
|
||||||
descp would always point to something useful. */
|
the R_ENTRY relocation, and the rest in the R_EXIT
|
||||||
if (descp)
|
relocation. */
|
||||||
|
bfd_put_32 (abfd, bfd_reloc->addend, p + 1);
|
||||||
|
|
||||||
|
/* Find the next R_EXIT relocation. */
|
||||||
|
for (tmp = j; tmp < subsection->reloc_count; tmp++)
|
||||||
{
|
{
|
||||||
bfd_put_32 (abfd, descp[0], p + 1);
|
tmp_reloc = subsection->orelocation[tmp];
|
||||||
bfd_put_32 (abfd, descp[1], p + 5);
|
if (tmp_reloc->howto->type == R_EXIT)
|
||||||
}
|
break;
|
||||||
else
|
|
||||||
{
|
|
||||||
bfd_put_32 (abfd, 0, p + 1);
|
|
||||||
bfd_put_32 (abfd, 0, p + 5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tmp == subsection->reloc_count)
|
||||||
|
abort ();
|
||||||
|
|
||||||
|
bfd_put_32 (abfd, tmp_reloc->addend, p + 5);
|
||||||
p = try_prev_fixup (abfd, &subspace_reloc_size,
|
p = try_prev_fixup (abfd, &subspace_reloc_size,
|
||||||
p, 9, reloc_queue);
|
p, 9, reloc_queue);
|
||||||
break;
|
break;
|
||||||
@ -4485,18 +4490,6 @@ bfd_som_set_symbol_type (symbol, type)
|
|||||||
som_symbol_data (symbol)->som_type = 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Attach an auxiliary header to the BFD backend so that it may be
|
/* Attach an auxiliary header to the BFD backend so that it may be
|
||||||
written into the object file. */
|
written into the object file. */
|
||||||
boolean
|
boolean
|
||||||
|
@ -64,12 +64,6 @@ typedef struct som_symbol
|
|||||||
the symbols from most used to least used we can significantly
|
the symbols from most used to least used we can significantly
|
||||||
reduce the size of the relocation stream for incomplete objects. */
|
reduce the size of the relocation stream for incomplete objects. */
|
||||||
int reloc_count;
|
int reloc_count;
|
||||||
|
|
||||||
/* The unwind descriptor bits associated with R_ENTRY relocations
|
|
||||||
for functions (not enough room in a BFD reloc to store all the
|
|
||||||
information, so we tack it onto the symbol associated with the
|
|
||||||
function. */
|
|
||||||
char *unwind;
|
|
||||||
}
|
}
|
||||||
som_symbol_type;
|
som_symbol_type;
|
||||||
|
|
||||||
@ -210,7 +204,6 @@ boolean bfd_som_set_section_attributes PARAMS ((asection *, int, int,
|
|||||||
boolean bfd_som_set_subsection_attributes PARAMS ((asection *, asection *,
|
boolean bfd_som_set_subsection_attributes PARAMS ((asection *, asection *,
|
||||||
int, unsigned int, int));
|
int, unsigned int, int));
|
||||||
void bfd_som_set_symbol_type PARAMS ((asymbol *, unsigned int));
|
void bfd_som_set_symbol_type PARAMS ((asymbol *, unsigned int));
|
||||||
void bfd_som_attach_unwind_info PARAMS ((asymbol *, char *));
|
|
||||||
boolean bfd_som_attach_aux_hdr PARAMS ((bfd *, int, char *));
|
boolean bfd_som_attach_aux_hdr PARAMS ((bfd *, int, char *));
|
||||||
int ** hppa_som_gen_reloc_type
|
int ** hppa_som_gen_reloc_type
|
||||||
PARAMS ((bfd *, int, int, enum hppa_reloc_field_selector_type_alt));
|
PARAMS ((bfd *, int, int, enum hppa_reloc_field_selector_type_alt));
|
||||||
|
Reference in New Issue
Block a user