diff options
author | Andy Ross <andrew.j.ross@intel.com> | 2016-10-04 11:48:21 -0700 |
---|---|---|
committer | Anas Nashif <nashif@linux.intel.com> | 2016-10-05 09:48:54 +0000 |
commit | 8d801a5e2744a98a3852833e38b496b2e3f44ddf (patch) | |
tree | 121645820237a2084f3526c72d557d3f6267c5b9 /scripts | |
parent | 4cc228baf6088f3b9b0e6a7b8cf34d89339cab8b (diff) |
sanitycheck: Remove linker VMA/LMA offset checking
This misfeature can crop up at development time as the linker scripts
are modified, not just as a regression in known tests (c.f. ZEP-955).
So it makes more sense to put it in a check_link_map script inovked
for every build. Remove it from sanitycheck.
Change-Id: I9c2f47a26a3bc03170b895545476350341e91170
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/sanitycheck | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/scripts/sanitycheck b/scripts/sanitycheck index 3ae2f3385..22b8d2005 100755 --- a/scripts/sanitycheck +++ b/scripts/sanitycheck @@ -487,7 +487,6 @@ class SizeCalculator: self.sections = [] self.rom_size = 0 self.ram_size = 0 - self.mismatches = [] self._calculate_sizes() @@ -516,17 +515,6 @@ class SizeCalculator: slist.append(v["name"]) return slist - def mismatched_sections(self): - """Get a list of sections in the binary whose LMA and VMA offsets - from the previous section aren't proportional. This leads to issues - on XIP systems as they aren't correctly copied in to RAM - """ - slist = [] - for v in self.sections: - if v["lma_off"] != v["vma_off"]: - slist.append((v["name"], v["lma_off"], v["vma_off"])) - return slist - def _calculate_sizes(self): """ Calculate RAM and ROM usage by section """ objdump_command = "objdump -h " + self.filename @@ -576,23 +564,9 @@ class SizeCalculator: stype = "unknown" recognized = False - lma_off = 0 - vma_off = 0 - - # Look for different section padding for LMA and VMA, if present - # this really messes up XIP systems as __csSet() copies all of - # them off flash into RAM as a single large block of memory - if self.is_xip and len(self.sections) > 0: - p = self.sections[-1] - - if stype == "rw" and p["type"] == "rw": - lma_off = load_addr - p["load_addr"] - vma_off = virt_addr - p["virt_addr"] - self.sections.append({"name" : name, "load_addr" : load_addr, "size" : size, "virt_addr" : virt_addr, - "type" : stype, "recognized" : recognized, - "lma_off" : lma_off, "vma_off" : vma_off}) + "type" : stype, "recognized" : recognized}) class MakeGoal: @@ -1523,7 +1497,6 @@ class TestSuite: goal.metrics["ram_size"] = sc.get_ram_size() goal.metrics["rom_size"] = sc.get_rom_size() goal.metrics["unrecognized"] = sc.unrecognized_sections() - goal.metrics["mismatched"] = sc.mismatched_sections() mg = MakeGenerator(self.outdir, asserts=enable_asserts) for i in self.instances.values(): @@ -1807,10 +1780,6 @@ def size_report(sc): info("%-17s 0x%08x 0x%08x %8d 0x%05x %-7s" % (v["name"], v["virt_addr"], v["load_addr"], v["size"], v["size"], v["type"])) - if v["lma_off"] != v["vma_off"]: - info(" WARNING: LMA and VMA offsets between %s and %s differ: %d vs %d" % - (sc.sections[i-1]["name"], v["name"], v["lma_off"], - v["vma_off"])) info("Totals: %d bytes (ROM), %d bytes (RAM)" % (sc.rom_size, sc.ram_size)) @@ -1929,11 +1898,6 @@ def main(): (COLOR_RED, COLOR_NORMAL, goal.name, str(goal.metrics["unrecognized"]))) failed += 1 - elif goal.metrics.get("mismatched"): - info("%sFAILED%s: %s has mismatched section offsets for: %s" % - (COLOR_RED, COLOR_NORMAL, goal.name, - str(goal.metrics["mismatched"]))) - failed += 1 if args.coverage: info("Generating coverage files...") |