summaryrefslogtreecommitdiff
path: root/src/arm/init.h
diff options
context:
space:
mode:
authorStephen Webb <swebb@blackberry.com>2022-07-23 22:30:23 -0400
committerStephen M. Webb <stephen.webb@bregmasoft.ca>2022-07-26 21:44:26 -0400
commite96db56e586ad7a1c8d27593382b365f775a398f (patch)
treeab6bcc10a8504204d1f52b379d2ddc7cb1efb1ff /src/arm/init.h
parent10e093db21b73e98ba8485b4b0696d330bf8dfdf (diff)
downloadlibunwind-e96db56e586ad7a1c8d27593382b365f775a398f.tar.gz
Stop assuming .text and .eh_frame segment
The coredump remote was architected on the assumption that the .text and .eh_frame sections were mapped onto the same segment, and that that segment was always the first PT_LOAD segment in an ELF file. Well, that was never a valid assumption, and moderns releases of various toolchains have started splitting the PT_LOAD segments for security reasons. This change implements an M:N mapping of PT_LOAD segments in a coredump file to backing ELF files and calculates and adjusts offsets appropriately. Because the backing files get mapped in a lot of file I/O operations have been replaced with simple memory reads. Once a backing file is memory mapped is stays mapped until the address space is destroyed. The ucd_*.[ch] files contain only functions that should not be exposed through the public API so they;re not mangled using the UB naming schedule because I just bring myself to write code with undefined behaviour. Reformatted some of the changed files using `astyle --style=gnu` for internal consistency withing the file. Fixes #363
Diffstat (limited to 'src/arm/init.h')
0 files changed, 0 insertions, 0 deletions