From: Petr Machata Date: Fri, 13 Feb 2009 14:33:46 +0000 (+0100) Subject: Replace assert with error message X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4feacff9f9a637094f292b32db3b4d77b2c9b2b9;p=thirdparty%2Felfutils.git Replace assert with error message --- diff --git a/src/dwarflint.c b/src/dwarflint.c index 583568dd0..1c8f5622b 100644 --- a/src/dwarflint.c +++ b/src/dwarflint.c @@ -2314,13 +2314,18 @@ relocate_one (struct relocation_data *reloc, GElf_Rela *rela, uint64_t *value, struct where *where, enum section_id offset_into) { - assert (offset_into != sec_invalid); - struct where reloc_where = where_from_reloc (reloc, where); where_reset_2 (&reloc_where, rela->r_offset); struct where reloc_ref_where = reloc_where; reloc_ref_where.next = where; + if (offset_into == sec_invalid) + { + wr_message (mc_impact_3 | mc_reloc, &reloc_ref_where, + ": relocates a datum that shouldn't be relocated.\n"); + return; + } + uint64_t addend; if (reloc->type == SHT_REL) addend = *value;