llvm-objcopy: Change sectionWithinSegment() to use virtual addresses instead of file...
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 24 May 2019 00:21:46 +0000 (00:21 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 24 May 2019 00:21:46 +0000 (00:21 +0000)
commitab09cca310e8de1b79766f93b3b83897eabb52dd
tree94cd3b9ad6bd3255ad727ebbb1d6aa7d2c6cd5f9
parent55229f6b10276526d76f7f6b900053e3c82b5bf7
llvm-objcopy: Change sectionWithinSegment() to use virtual addresses instead of file offsets for SHT_NOBITS sections.

Without this, sectionWithinSegment() will return the wrong answer for bss
sections. This doesn't seem to matter now (for non-broken ELF files), but
it will matter with a change that I'm working on.

Differential Revision: https://reviews.llvm.org/D58426

llvm-svn: 361578
llvm/tools/llvm-objcopy/ELF/Object.cpp