From: Petr Machata Date: Tue, 7 Apr 2009 15:55:57 +0000 (+0200) Subject: dwarflint: Handle NONE relocations X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db0ed3fca026fdb68563807b745381f801541327;p=thirdparty%2Felfutils.git dwarflint: Handle NONE relocations --- diff --git a/src/dwarflint.c b/src/dwarflint.c index 1d58e6311..e5f7bbec8 100644 --- a/src/dwarflint.c +++ b/src/dwarflint.c @@ -4618,9 +4618,17 @@ read_rel (struct section_data *secdata, Elf_Data *reldata, bool elf_64) continue; } + int cur_type = GELF_R_TYPE (rela->r_info); + if (cur_type == 0) /* No relocation. */ + { + wr_message (mc_impact_3 | mc_reloc | mc_acc_bloat, &where, + ": NONE relocation is superfluous.\n"); + goto skip; + } + cur->offset = rela->r_offset; cur->symndx = GELF_R_SYM (rela->r_info); - cur->type = GELF_R_TYPE (rela->r_info); + cur->type = cur_type; where_reset_2 (&where, cur->offset);