From: nickc Date: Fri, 1 Sep 2006 11:38:20 +0000 (+0000) Subject: PR binutils/3146 X-Git-Tag: drop_9x_support_start~1812 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f81d267ecac2862d6a8cea34b3c27db042f22326;p=pf3gnuchains%2Fpf3gnuchains4x.git PR binutils/3146 * readelf.c (dump_relocations): Check for a NULL value in rtype before using it. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index fc360b0a2b..184f0b18d3 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2006-09-01 Nick Clifton + + PR binutils/3146 + * readelf.c (dump_relocations): Check for a NULL value in rtype + before using it. + 2006-08-21 Pedro Alves * configure.in: Split arm-pe and arm-wince-pe. Build dlltool diff --git a/binutils/readelf.c b/binutils/readelf.c index 6bb2e4ce00..96442562b8 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -1148,6 +1148,7 @@ dump_relocations (FILE *file, printf (do_wide ? "%-22.22s" : "%-17.17s", rtype); if (elf_header.e_machine == EM_ALPHA + && rtype != NULL && streq (rtype, "R_ALPHA_LITUSE") && is_rela) { @@ -1246,7 +1247,9 @@ dump_relocations (FILE *file, print_vma (rels[i].r_addend, LONG_HEX); } - if (elf_header.e_machine == EM_SPARCV9 && streq (rtype, "R_SPARC_OLO10")) + if (elf_header.e_machine == EM_SPARCV9 + && rtype != NULL + && streq (rtype, "R_SPARC_OLO10")) printf (" + %lx", (unsigned long) ELF64_R_TYPE_DATA (info)); putchar ('\n');