uint64_t r_cov_end = cov_end + shdr->sh_addr - address;
if (!coverage_pristine (cov, cov_begin, cov_end - cov_begin))
- {
- wr_message (mc_aranges | mc_impact_2 | mc_error, &where,
- ": address range %#" PRIx64 "..%#" PRIx64
- " overlaps with another one defined earlier.\n",
- address, end);
- cov_retval = false;
- }
+ /* Not a show stopper, this shouldn't derain high-level. ou*/
+ wr_message (mc_aranges | mc_impact_2 | mc_error, &where,
+ ": address range %#" PRIx64 "..%#" PRIx64
+ " overlaps with another one defined earlier.\n",
+ address, end);
/* Section coverage... */
coverage_add (cov, cov_begin, cov_end);
if (!found)
{
+ /* Not a show stopper. */
wr_error (&where,
": couldn't find a section that the range %#"
PRIx64 "..%#" PRIx64 " covers.\n", address, end);
- retval = false;
continue;
}
else
if (data == NULL)
wr_error (&WHERE (sec_aranges, NULL),
": couldn't read section data, coverage analysis may be inaccurate.\n");
+ else if (data->d_buf == NULL)
+ wr_error (&WHERE (sec_aranges, NULL),
+ ": data-less section data, coverage analysis may be inaccurate.\n");
void section_hole (uint64_t h_begin, uint64_t h_end,
void *user __attribute__ ((unused)))
return;
uint64_t base = sco->shdr.sh_addr;
- h_begin += base;
- h_end += base;
- if (data != NULL)
+ if (data != NULL && data->d_buf != NULL)
{
bool zeroes = true;
for (uint64_t j = h_begin; j < h_end; ++j)
- if (((char *)data->d_buf)[j - base] != 0)
+ if (((char *)data->d_buf)[j] != 0)
{
zeroes = false;
break;
wr_error (&where,
": addresses %#" PRIx64 "..%#" PRIx64
- " (of section %s) are not covered.\n",
+ " of section %s are not covered.\n",
h_begin + base, h_end + base, scnname);
}
((struct where) \
{(SECTION), (uint64_t)-1, (uint64_t)-1, (uint64_t)-1, NULL, NEXT})
- extern const char *where_fmt (const struct where *wh, char *ptr);
- extern void where_fmt_chain (const struct where *wh, const char *severity);
+ extern const char *where_fmt (struct where *wh, char *ptr);
+ extern void where_fmt_chain (struct where *wh, const char *severity);
extern void where_reset_1 (struct where *wh, uint64_t addr);
extern void where_reset_2 (struct where *wh, uint64_t addr);
extern void where_reset_3 (struct where *wh, uint64_t addr);
mc_all = 0xffffff00, // all areas
};
- extern void wr_error (const struct where *wh, const char *format, ...)
+ extern void wr_error (struct where *wh, const char *format, ...)
__attribute__ ((format (printf, 2, 3)));
- extern void wr_warning (const struct where *wh, const char *format, ...)
+ extern void wr_warning (struct where *wh, const char *format, ...)
__attribute__ ((format (printf, 2, 3)));
extern void wr_message (enum message_category category, const struct where *wh,