summaryrefslogtreecommitdiff
path: root/bfd/coffgen.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2001-08-17 08:57:42 +0000
committerAlan Modra <amodra@bigpond.net.au>2001-08-17 08:57:42 +0000
commit801228f080c21a3b0d70ed333576b8896b5ca071 (patch)
treee36ce786fb6f0c55be3088002c4636cc17033c09 /bfd/coffgen.c
parentbfffad065656a55ced6336df62a067f6d92b571a (diff)
downloadbinutils-redhat-801228f080c21a3b0d70ed333576b8896b5ca071.tar.gz
* coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
silence warning. * coffgen.c (coff_print_symbol): Fix warnings. (coff_find_nearest_line): Likewise. * cofflink.c (_bfd_coff_link_input_bfd): Likewise. * coff-alpha.c (alpha_convert_external_reloc): Likewise. * format.c (bfd_check_format_matches): Likewise. (bfd_set_format): Likewise. * coff-ia64.c: Add missing prototypes. * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend signed to silence warnings. (elf64_alpha_relocate_section): Likewise. (elf64_alpha_find_reloc_at_ofs): Fix warnings. (elf64_alpha_add_symbol_hook): Likewise. (elf64_alpha_final_link): Likewise. (elf64_alpha_relax_section): Remove redundant assign to info.gotent. (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args. (elf64_alpha_size_got_sections): Likewise. * elfxx-ia64.c: Add missing prototypes. (elfNN_ia64_relocate_section): Fix warning. (elfNN_ia64_unwind_entry_compare): Make params const.
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r--bfd/coffgen.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index bd2d158ba5..533b88998a 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -2106,16 +2106,18 @@ coff_print_symbol (abfd, filep, symbol, how)
case C_EXT:
if (ISFCN (combined->u.syment.n_type))
{
+ long next, llnos;
+
+ if (auxp->fix_end)
+ next = (auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p
+ - root);
+ else
+ next = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l;
+ llnos = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_lnnoptr;
fprintf (file,
_("AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"),
- tagndx,
- auxp->u.auxent.x_sym.x_misc.x_fsize,
- auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_lnnoptr,
- (auxp->fix_end
- ? ((long)
- (auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p
- - root))
- : auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l));
+ tagndx, auxp->u.auxent.x_sym.x_misc.x_fsize,
+ llnos, next);
break;
}
/* else fall through */
@@ -2280,7 +2282,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
/* Avoid endless loops on erroneous files by ensuring that
we always move forward in the file. */
- if (p - cof->raw_syments >= p->u.syment.n_value)
+ if (p >= cof->raw_syments + p->u.syment.n_value)
break;
p = cof->raw_syments + p->u.syment.n_value;