* libhppa.h: Remove "esel" changes. Not the right approach.
* som.c: Corresponding changes. (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols which don't have a SOM symbol type associated with them. Reverses a 1994 change. More PA EH tweakage (to get exception handling tables properly relocated in shared libraries).
This commit is contained in:
parent
047465fd1b
commit
e751d5068f
2 changed files with 23 additions and 19 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* libhppa.h: Remove "esel" changes. Not the right approach.
|
||||||
|
* som.c: Corresponding changes.
|
||||||
|
(som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
|
||||||
|
which don't have a SOM symbol type associated with them.
|
||||||
|
Reverses a 1994 change.
|
||||||
|
|
||||||
Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
|
Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
Make ld -N more reasonable for ELF:
|
Make ld -N more reasonable for ELF:
|
||||||
|
|
34
bfd/som.c
34
bfd/som.c
|
@ -1585,15 +1585,6 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff)
|
||||||
final_types[5] = NULL;
|
final_types[5] = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (field == e_esel)
|
|
||||||
{
|
|
||||||
final_types[0] = (int *)bfd_alloc_by_size_t (abfd, sizeof (int));
|
|
||||||
*final_types[0] = R_COMP2;
|
|
||||||
final_types[1] = final_type;
|
|
||||||
*final_types[1] = R_DATA_EXPR;
|
|
||||||
final_types[2] = NULL;
|
|
||||||
break;;
|
|
||||||
}
|
|
||||||
/* PLABELs get their own relocation type. */
|
/* PLABELs get their own relocation type. */
|
||||||
else if (field == e_psel
|
else if (field == e_psel
|
||||||
|| field == e_lpsel
|
|| field == e_lpsel
|
||||||
|
@ -2843,7 +2834,6 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R_CODE_EXPR:
|
case R_CODE_EXPR:
|
||||||
case R_DATA_EXPR:
|
|
||||||
/* The only time we generate R_COMP1, R_COMP2 and
|
/* The only time we generate R_COMP1, R_COMP2 and
|
||||||
R_CODE_EXPR relocs is for the difference of two
|
R_CODE_EXPR relocs is for the difference of two
|
||||||
symbols. Hence we can cheat here. */
|
symbols. Hence we can cheat here. */
|
||||||
|
@ -3739,16 +3729,22 @@ som_bfd_derive_misc_symbol_info (abfd, sym, info)
|
||||||
info->arg_reloc = som_symbol_data (sym)->tc_data.hppa_arg_reloc;
|
info->arg_reloc = som_symbol_data (sym)->tc_data.hppa_arg_reloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the type is unknown at this point, it should be ST_DATA or
|
/* For unknown symbols, set their type to ST_DATA.
|
||||||
ST_CODE (function/ST_ENTRY symbols were handled as special
|
|
||||||
cases above). */
|
We used to set the symbol type based on the section this symbol
|
||||||
|
was in (ST_DATA for DATA sections, ST_CODE for CODE sections).
|
||||||
|
Strictly speaking, this is the right approach. However, the
|
||||||
|
linker chokes if we have an R_DATA_ONE_SYMBOL reloc involving
|
||||||
|
an ST_CODE symbol in a shared library, which happens for
|
||||||
|
exception handling tables.
|
||||||
|
|
||||||
|
I tried an alternate approach to generating exception handling
|
||||||
|
tables using PUSH_SYM and DATA_EXPR relocs, but that fails to
|
||||||
|
relocate exception handling tables in shared libraries.
|
||||||
|
|
||||||
|
What a pain. */
|
||||||
else if (som_symbol_data (sym)->som_type == SYMBOL_TYPE_UNKNOWN)
|
else if (som_symbol_data (sym)->som_type == SYMBOL_TYPE_UNKNOWN)
|
||||||
{
|
info->symbol_type = ST_DATA;
|
||||||
if (sym->section->flags & SEC_CODE)
|
|
||||||
info->symbol_type = ST_CODE;
|
|
||||||
else
|
|
||||||
info->symbol_type = ST_DATA;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* From now on it's a very simple mapping. */
|
/* From now on it's a very simple mapping. */
|
||||||
else if (som_symbol_data (sym)->som_type == SYMBOL_TYPE_ABSOLUTE)
|
else if (som_symbol_data (sym)->som_type == SYMBOL_TYPE_ABSOLUTE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue