Add an ELF image builder and use for ElfReader tests
Adds a simple builder to create in-memory ELF images to support more comprehensive unit tests, and adds tests for scenarios which were previously untested. The ELF images produced by the builder have been validated by dumping their contents using eu-readelf. Currently the builder and tests only cover the relocatable case where virtual addresses in the file are the same as the corresponding file offsets. The builder and tests will be extended in follow-on CLs to support relocatable images loaded at an offset, and non-relocatable images. Also corrects a comment in the .cc which wrongly implied position independent code is not used within non-Fuchsia non-Android ELF files. Bug: 1105170 Change-Id: I35ae76beeb2ddb50602b0d28757673671990bb9c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2304664 Commit-Queue: Mike Wittman <wittman@chromium.org> Reviewed-by:Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#792384}
Showing
Please register or sign in to comment