summaryrefslogtreecommitdiffstats
path: root/libunwind/src/DwarfParser.hpp
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2017-12-25 17:05:07 +0000
committerwhitequark <whitequark@whitequark.org>2017-12-25 17:05:07 +0000
commitdcd93505da2366f49d58946f23a9f0668118917f (patch)
tree82d7913b94343f556c1b249e02e676736ef7a320 /libunwind/src/DwarfParser.hpp
parented8d2bc5c6cf35b00e5122a5238509118a34b971 (diff)
downloadbcm5719-llvm-dcd93505da2366f49d58946f23a9f0668118917f.tar.gz
bcm5719-llvm-dcd93505da2366f49d58946f23a9f0668118917f.zip
[libunwind] Add proper support for DWARF unwind on bare metal.
Right now, ARM EHABI unwind on bare metal expects to find the symbols __exidx_start and __exidx_end defined, and uses those to locate the EH tables. However, DWARF unwind on bare metal expects to find dl_iterate_phdr, which, although possible to provide, is inconvenient and mildly absurd. This commit provides feature parity with ARM EHABI unwind by looking for symbols __eh_frame_start, __eh_frame_end, __eh_frame_hdr_start and __eh_frame_hdr_end, denoting the start and end of the sections with corresponding names. As far as I know, there is no de jure or de facto ABI providing any such names, so I chose the obvious ones. The .eh_frame_hdr support is optional for maximum flexibility and possible space savings (e.g. if libunwind is only used to provide backtraces when a device crashes, providing the .eh_frame_hdr, which is an index for rapid access to EH tables, would be a waste.) The support for .eh_frame_hdr/DWARF index in the first place is conditional on defined(_LIBUNWIND_SUPPORT_DWARF_INDEX), although right now config.h will always define this macro. The support for DWARF unwind on bare metal has been validated within the ARTIQ environment[1]. [1]: https://m-labs.hk/artiq/ llvm-svn: 321445
Diffstat (limited to 'libunwind/src/DwarfParser.hpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud