[SuperSize] Extend SuperSize-archive to embrace section ranges.
Previously SuperSize-archive focuses on section sizes and largely ignores section addresses. As a result, "** ELF Section" symbols all have address of 0. This CL refactors archive.py so that |section_range| (2-tuple of address and size) become a primary object of interest, and replaces widespread |section_size| usage. Details: * linker_map_parser.py: Changes to store and return section ranges. * Requires test output update. * archive.py: Extensive changes to use ranges throughout. * Add _ExtendSectionRange() helper. * _AddUnattributedSectionSymbols(): Add "** ELF Section" symbols in section name order, to make later sorting more predictable. * Not changed: CreateSectionSizesAndSymbols() params, to maintain .size format compatibility. "** ELF Section:" symbols can now have non-0 addresse (and better sort order). This required update of integration_test.py expected outputs. Other changes: * Add dbg.py to aid debugging (compatible with Python 3). Change-Id: Ife5a695a4d3d75a6c67dabae5de91c9bb9618100 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2099466Reviewed-by:Samuel Huang <huangs@chromium.org> Reviewed-by:
Andrew Grieve <agrieve@chromium.org> Commit-Queue: Samuel Huang <huangs@chromium.org> Cr-Commit-Position: refs/heads/master@{#749544}
Showing
Please register or sign in to comment