* som.c (som_decode_symclass): Handle absolute symbols by checking

the SOM type (since they will rarely if ever be in the absolute
	section).

Something Ian noticed.
This commit is contained in:
Jeff Law 1995-08-07 20:53:29 +00:00
parent 3d915dd29d
commit 515b81046b
2 changed files with 35 additions and 5 deletions

View file

@ -1,3 +1,21 @@
Mon Aug 7 14:51:08 1995 Jeff Law (law@snake.cs.utah.edu)
* som.c (som_decode_symclass): Handle absolute symbols by checking
the SOM type (since they will rarely if ever be in the absolute
section).
Wed Aug 6 09:12:50 1995 Doug Evans <dje@canuck.cygnus.com>
* archures.c (bfd_mach_sparc, bfd_mach_sparc64): Define.
* bfd-in2.h: Regenerated.
* cpu-sparc.c (sparc_arch_info): Renamed from arch_info_struct.
(sparc64_arch_info): New static variable.
(bfd_sparc_arch): Link in sparc64_arch_info.
* elf64-sparc.c (sparc64_elf_xxx): Renamed from elf64_xxx.
(sparc64_elf_object_p): New static function.
(elf_backend_object_p): Define.
* config/sparc64-elf.mt (SELECT_VECS): Add bfd_elf32_sparc_vec.
Sat Aug 5 00:04:08 1995 Jeff Law (law@snake.cs.utah.edu) Sat Aug 5 00:04:08 1995 Jeff Law (law@snake.cs.utah.edu)
* som (som_get_reloc_upper_bound): Return -1 on error. Compute * som (som_get_reloc_upper_bound): Return -1 on error. Compute

View file

@ -1523,7 +1523,12 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff)
bfd_set_error (bfd_error_no_memory); bfd_set_error (bfd_error_no_memory);
return NULL; return NULL;
} }
*final_types[0] = R_FSEL; if (field == e_fsel)
*final_types[0] = R_FSEL;
else if (field == e_rsel)
*final_types[0] = R_RSEL;
else if (field == e_lsel)
*final_types[0] = R_LSEL;
*final_types[1] = R_COMP2; *final_types[1] = R_COMP2;
*final_types[2] = R_COMP2; *final_types[2] = R_COMP2;
*final_types[3] = R_COMP1; *final_types[3] = R_COMP1;
@ -1576,7 +1581,12 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff)
bfd_set_error (bfd_error_no_memory); bfd_set_error (bfd_error_no_memory);
return NULL; return NULL;
} }
*final_types[1] = R_FSEL; if (field == e_fsel)
*final_types[0] = R_FSEL;
else if (field == e_rsel)
*final_types[0] = R_RSEL;
else if (field == e_lsel)
*final_types[0] = R_LSEL;
*final_types[1] = R_COMP2; *final_types[1] = R_COMP2;
*final_types[2] = R_COMP2; *final_types[2] = R_COMP2;
*final_types[3] = R_COMP1; *final_types[3] = R_COMP1;
@ -4605,8 +4615,8 @@ som_get_reloc_upper_bound (abfd, asect)
if (asect->flags & SEC_RELOC) if (asect->flags & SEC_RELOC)
{ {
if (! som_slurp_reloc_table (abfd, asect, NULL, true)) if (! som_slurp_reloc_table (abfd, asect, NULL, true))
return false; return -1;
return (asect->reloc_count + 1) * sizeof (arelent); return (asect->reloc_count + 1) * sizeof (arelent *);
} }
/* There are no relocations. */ /* There are no relocations. */
return 0; return 0;
@ -4998,7 +5008,9 @@ som_decode_symclass (symbol)
if (!(symbol->flags & (BSF_GLOBAL|BSF_LOCAL))) if (!(symbol->flags & (BSF_GLOBAL|BSF_LOCAL)))
return '?'; return '?';
if (bfd_is_abs_section (symbol->section)) if (bfd_is_abs_section (symbol->section)
|| (som_symbol_data (symbol) != NULL
&& som_symbol_data (symbol)->som_type == SYMBOL_TYPE_ABSOLUTE))
c = 'a'; c = 'a';
else if (symbol->section) else if (symbol->section)
c = som_section_type (symbol->section->name); c = som_section_type (symbol->section->name);