diff options
author | Fred Fish <fnf@specifix.com> | 1997-03-06 19:53:29 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1997-03-06 19:53:29 +0000 |
commit | 13b58694fbcfb75644dd7e6d48d7c0995d4ab861 (patch) | |
tree | a23f0ef4aea14635e3f8c8c2bb38e98fdd3cc9a8 /bfd/coffcode.h | |
parent | a9b2f48debf65c32f09a9b3f31c6530e6cb56996 (diff) | |
download | gdb-13b58694fbcfb75644dd7e6d48d7c0995d4ab861.zip gdb-13b58694fbcfb75644dd7e6d48d7c0995d4ab861.tar.gz gdb-13b58694fbcfb75644dd7e6d48d7c0995d4ab861.tar.bz2 |
start-sanitize-tic80
* coff-tic80.c (rtype2howto): If passed a relocation type we don't
understand, just set the howto field to NULL, and the caller will
print an appropriate error message.
end-sanitize-tic80
* coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
block. Use NULL for initializations of "ptr" rather than bare 0.
* coff-h8300.c: Fix typo in comment.
* coff-h8500.c: Ditto.
* coff-w65.c: Ditto
* coff-z8k.c: Ditto.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r-- | bfd/coffcode.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 5d8b754..e2a7dde 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -1906,6 +1906,13 @@ coff_set_flags (abfd, magicp, flagsp) } break; #endif +/* start-sanitize-tic80 */ +#ifdef TIC80_ARCH_MAGIC + case bfd_arch_tic80: + *magicp = TIC80_ARCH_MAGIC; + return true; +#endif +/* end-sanitize-tic80 */ #ifdef ARMMAGIC case bfd_arch_arm: *magicp = ARMMAGIC; @@ -3620,26 +3627,20 @@ coff_slurp_reloc_table (abfd, asect, symbols) for (idx = 0; idx < asect->reloc_count; idx++) { -#ifdef RELOC_PROCESSING struct internal_reloc dst; struct external_reloc *src; - - cache_ptr = reloc_cache + idx; - src = native_relocs + idx; - coff_swap_reloc_in (abfd, src, &dst); - - RELOC_PROCESSING (cache_ptr, &dst, symbols, abfd, asect); -#else - struct internal_reloc dst; +#ifndef RELOC_PROCESSING asymbol *ptr; - struct external_reloc *src; +#endif cache_ptr = reloc_cache + idx; src = native_relocs + idx; coff_swap_reloc_in (abfd, src, &dst); - +#ifdef RELOC_PROCESSING + RELOC_PROCESSING (cache_ptr, &dst, symbols, abfd, asect); +#else cache_ptr->address = dst.r_vaddr; if (dst.r_symndx != -1) @@ -3650,7 +3651,7 @@ coff_slurp_reloc_table (abfd, asect, symbols) ("%s: warning: illegal symbol index %ld in relocs", bfd_get_filename (abfd), dst.r_symndx); cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; - ptr = 0; + ptr = NULL; } else { @@ -3662,7 +3663,7 @@ coff_slurp_reloc_table (abfd, asect, symbols) else { cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; - ptr = 0; + ptr = NULL; } /* The symbols definitions that we have read in have been @@ -3680,7 +3681,7 @@ coff_slurp_reloc_table (abfd, asect, symbols) /* Fill in the cache_ptr->howto field from dst.r_type */ RTYPE2HOWTO (cache_ptr, &dst); -#endif +#endif /* RELOC_PROCESSING */ if (cache_ptr->howto == NULL) { |