aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-07-21 08:24:42 -0700
committerFangrui Song <i@maskray.me>2020-07-21 08:33:19 -0700
commit8c6d48baf67bcd4e351ab32ef2fc801523db05db (patch)
treee84b91dadaf48e412ab54e23d7b00aba474972da /llvm/unittests/Support/CommandLineTest.cpp
parent741e55aeed758c747d91e99e7164afa2fb5d9c10 (diff)
downloadllvm-8c6d48baf67bcd4e351ab32ef2fc801523db05db.zip
llvm-8c6d48baf67bcd4e351ab32ef2fc801523db05db.tar.gz
llvm-8c6d48baf67bcd4e351ab32ef2fc801523db05db.tar.bz2
[llvm-readobj] Construct relocation-aware DWARFDataExtractor to decode .eh_frame addresses correctly
In an object file, a "PC Begin" field in a FDE is usually relocated by a PC-relative relocation. Use a relocation-aware DWARFDataExtractor overload (with DWARFContext and a reference to its internal .eh_frame representation) to decode addresses correctly. In an object file, most sections have addresses of zero. So the displayed addresses are almost always offsets relative to the start of the associated text section. DWARFContext::create handles .eh_frame and .rela.eh_frame by itself, so if there are more than one .eh_frame (technically possible, but almost always erronerous in practice), this will only handle the first one. Supporting multiple .eh_frame is beyond the scope of this patch. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D84106
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
0 files changed, 0 insertions, 0 deletions