platform_system_core/libunwindstack
Florian Mayer 249c90ff17 Fix missing load bias.
There are binaries that have non-executable LOAD with p_offset=0.

E.g.,

Program Headers:
  Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz   Flg Align
  PHDR           0x000040 0x0000000000400040 0x0000000000400040 0x0002a0 0x0002a0 R   0x8
  INTERP         0x0002e0 0x00000000004002e0 0x00000000004002e0 0x00001c 0x00001c R   0x1
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
  LOAD           0x000000 0x0000000000400000 0x0000000000400000 0x0059e0 0x0059e0 R   0x1000
  LOAD           0x006000 0x0000000000406000 0x0000000000406000 0x10f2b05 0x10f2b05 R E 0x1000
  LOAD           0x10f9000 0x00000000014f9000 0x00000000014f9000 0x70f634 0x70f634 R   0x1000
  LOAD           0x1808f18 0x0000000001c09f18 0x0000000001c09f18 0x089fc8 0x0a7ab8 RW  0x1000
  DYNAMIC        0x1864ce0 0x0000000001c65ce0 0x0000000001c65ce0 0x000240 0x000240 RW  0x8
  NOTE           0x0002fc 0x00000000004002fc 0x00000000004002fc 0x000020 0x000020 R   0x4
  TLS            0x1808f18 0x0000000001c09f18 0x0000000001c09f18 0x000010 0x000010 R   0x8
  GNU_EH_FRAME   0x11abde8 0x00000000015abde8 0x00000000015abde8 0x14484c 0x14484c R   0x4
  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RWE 0x10
  GNU_RELRO      0x1808f18 0x0000000001c09f18 0x0000000001c09f18 0x05c0e8 0x05c0e8 R   0x1

Test: host libunwindstack_test passes.
Test: Modified unit tests and new offline test.

Change-Id: I3992f712be238c7d4109556580b5dcc71175fe19
2019-07-09 10:22:36 -07:00
..
benchmarks Fix copy / move behaviour of Maps object. 2019-03-05 13:05:36 +00:00
include/unwindstack Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
tests Fix missing load bias. 2019-07-09 10:22:36 -07:00
tools Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
.clang-format Use the 2 space clang format for libunwindstack. 2017-03-21 10:41:45 -07:00
Android.bp Fix missing load bias. 2019-07-09 10:22:36 -07:00
ArmExidx.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ArmExidx.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
AsmGetRegsMips.S Add libunwindstack support for Mips and Mips64 2017-12-11 15:44:40 +01:00
AsmGetRegsMips64.S Add libunwindstack support for Mips and Mips64 2017-12-11 15:44:40 +01:00
AsmGetRegsX86.S Fix wrong mov instruction size. 2018-01-25 11:44:19 -08:00
AsmGetRegsX86_64.S Add full support for initing registers. 2017-07-11 12:15:54 -07:00
Check.h Add error propagation into Unwinder/Elf objects. 2018-01-24 17:50:46 -08:00
DexFile.cpp Revert "Check for data races when reading JIT/DEX entries." 2019-04-05 18:23:32 +00:00
DexFile.h Revert "Check for data races when reading JIT/DEX entries." 2019-04-05 18:23:32 +00:00
DexFiles.cpp Revert "Check for data races when reading JIT/DEX entries." 2019-04-05 18:23:32 +00:00
DwarfCfa.cpp Move DwarfCfaInfo::kTable from data.rel.ro to rodata 2018-12-14 06:03:09 -08:00
DwarfCfa.h Move DwarfCfaInfo::kTable from data.rel.ro to rodata 2018-12-14 06:03:09 -08:00
DwarfDebugFrame.h Refactor the DwarfSection classes. 2018-06-27 14:52:21 -07:00
DwarfEhFrame.h Refactor the DwarfSection classes. 2018-06-27 14:52:21 -07:00
DwarfEhFrameWithHdr.cpp Remove sequential search from DwarfEhFrameWithHdr. 2019-03-29 14:08:37 -07:00
DwarfEhFrameWithHdr.h Remove sequential search from DwarfEhFrameWithHdr. 2019-03-29 14:08:37 -07:00
DwarfEncoding.h Make the library usable as a library. 2017-07-14 12:20:23 -07:00
DwarfMemory.cpp Remove CHECK in AdjustEncodedValue. 2018-12-20 08:40:58 -08:00
DwarfOp.cpp libunwindstack: Move DwarfOp callback table to rodata section 2019-01-24 11:11:15 -08:00
DwarfOp.h libunwindstack: Move DwarfOp callback table to rodata section 2019-01-24 11:11:15 -08:00
DwarfSection.cpp Add minimal support for Dwarf 5. 2019-04-01 16:56:09 -07:00
Elf.cpp Fix pc/function name for signal handler frame. 2019-04-12 17:23:18 -07:00
ElfInterface.cpp Fix missing load bias. 2019-07-09 10:22:36 -07:00
ElfInterfaceArm.cpp Remove Memory::ReadField. 2018-07-12 12:45:31 -07:00
ElfInterfaceArm.h Remove Memory::ReadField. 2018-07-12 12:45:31 -07:00
Global.cpp Fix copy / move behaviour of Maps object. 2019-03-05 13:05:36 +00:00
JitDebug.cpp Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
LocalUnwinder.cpp Fix pc/function name for signal handler frame. 2019-04-12 17:23:18 -07:00
Log.cpp Make the library usable as a library. 2017-07-14 12:20:23 -07:00
MapInfo.cpp Fix potential race condition. 2019-06-19 18:51:31 -07:00
Maps.cpp Fix copy / move behaviour of Maps object. 2019-03-05 13:05:36 +00:00
Memory.cpp Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryBuffer.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryCache.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryFileAtOffset.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryLocal.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryOffline.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryOfflineBuffer.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryRange.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryRemote.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
Regs.cpp Expose per arch headers. 2018-02-08 19:29:08 -08:00
RegsArm.cpp Add missing includes. 2018-12-06 10:09:20 -08:00
RegsArm64.cpp Add missing includes. 2018-12-06 10:09:20 -08:00
RegsInfo.h Fix off by one error. 2018-10-23 18:10:41 +01:00
RegsMips.cpp Fix usage of Read instead of ReadFully. 2019-01-15 19:10:49 -08:00
RegsMips64.cpp Add missing includes. 2018-12-06 10:09:20 -08:00
RegsX86.cpp libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
RegsX86_64.cpp Add missing includes. 2018-12-06 10:09:20 -08:00
Symbols.cpp Add missing includes. 2018-12-06 10:09:20 -08:00
Symbols.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
Unwinder.cpp Display offsets for dex frames. 2019-06-04 12:07:05 -07:00