Lines Matching refs:reloc

84     struct RelocEntry *reloc;  member
333 static void relocDiag(const struct NanoAppInfo *app, const struct RelocEntry *reloc, const char *ms… in relocDiag() argument
335 size_t symIdx = reloc->info >> 8; in relocDiag()
336 uint8_t symType = reloc->info; in relocDiag()
338 ERR("Reloc %zu %s", reloc - app->reloc, msg); in relocDiag()
340 ERR(" Where: 0x%08" PRIX32, reloc->where); in relocDiag()
351 static uint8_t fixupReloc(struct NanoAppInfo *app, struct RelocEntry *reloc, in fixupReloc() argument
356 uint32_t relocOffset = reloc->where; in fixupReloc()
362 } else if (IS_IN_RAM(reloc->where)) { in fixupReloc()
363 relocOffset = reloc->where - RAM_BASE; in fixupReloc()
366 relocDiag(app, reloc, "is neither in RAM nor in FLASH"); in fixupReloc()
373 relocDiag(app, reloc, "points outside valid data area"); in fixupReloc()
377 switch (reloc->info & 0xFF) { in fixupReloc()
385 relocDiag(app, reloc, "has section relocation with non-zero symbol address"); in fixupReloc()
391 relocDiag(app, reloc, "has unknown type"); in fixupReloc()
443 app.reloc = (struct RelocEntry*)(buf + sect->rel_start - FLASH_BASE); in handleApp()
480 struct RelocEntry *reloc = &app.reloc[i]; in handleApp() local
482 uint32_t relocType = reloc->info & 0xff; in handleApp()
483 uint32_t whichSym = reloc->info >> 8; in handleApp()
487 relocDiag(&app, reloc, "references a nonexistent symbol"); in handleApp()
494 if (IS_IN_RANGE_E(reloc->where, sect->bss_start, sect->bss_end)) in handleApp()
496 else if (IS_IN_RANGE_E(reloc->where, sect->data_start, sect->data_end)) in handleApp()
498 else if (IS_IN_RANGE_E(reloc->where, sect->got_start, sect->got_end)) in handleApp()
500 else if (IS_IN_RANGE_E(reloc->where, FLASH_BASE, FLASH_BASE + sizeof(struct BinHdr))) in handleApp()
506 i, reloc->where, reloc->info & 0xff, whichSym, sym->addr, seg); in handleApp()
509 …if (IS_IN_FLASH(reloc->where) && reloc->where - FLASH_BASE < sizeof(struct BinHdr) && relocType ==… in handleApp()
517 switch (fixupReloc(&app, reloc, sym, NULL)) { in handleApp()
519 relocDiag(&app, reloc, "is in APPHDR but relocated to RAM"); in handleApp()
535 if (!IS_IN_RAM(reloc->where)) { in handleApp()
536 relocDiag(&app, reloc, "is not in RAM"); in handleApp()
540 if (fixupReloc(&app, reloc, sym, nanoReloc) != NANO_RELOC_LAST) { in handleApp()