-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Linux support to dr_create_memory_dump #7046
Comments
ivankyluk
changed the title
Add Linux (X64 only) support to dr_create_memory_dump
Add Linux support to dr_create_memory_dump
Oct 18, 2024
ivankyluk
added a commit
that referenced
this issue
Nov 7, 2024
This is the first change to add Linux support to dr_create_memory_dump. The memory dump is written in ELF format and saved under the logs directory following the Windows example in win32/os.c. Add a new test, memory_dump_test, to test dr_create_memory_dump for X64 Linux. Issue: #7046
ivankyluk
added a commit
that referenced
this issue
Nov 26, 2024
Set postcmd to use "readelf -a" to dump the contents of Linux memory dump file. Replace suite/tests/client-interface/memory_dump_test.expect with suite/tests/client-interface/memory_dump_test.templatex which validates the contents of the output of "readelf -a". Issue: #7046
ivankyluk
added a commit
that referenced
this issue
Dec 5, 2024
) Add loadable segment program headers to memory dump file. Set the entry point address in the ELF file header based on the PC value. Update the unit test to check loadable segment program header. Here's the output of readelf -l using the unit test output from a X86 machine: $ readelf -l logs/simple_app.3281609.00000000.elf Elf file type is CORE (Core file) Entry point 0x7fcd05936320 There are 47 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align NOTE 0x0000000000000a88 0x0000000000000000 0x0000000000000000 0x0000000000000378 0x0000000000000378 0x2 LOAD 0x0000000000000e00 0x00007fcac1000000 0x00007fcac1000000 0x0000000000040000 0x0000000000040000 RW 0x1000 LOAD 0x0000000000040e00 0x00007fcac1041000 0x00007fcac1041000 0x0000000000006000 0x0000000000006000 RW 0x1000 LOAD 0x0000000000046e00 0x00007fcac1049000 0x00007fcac1049000 0x0000000000004000 0x0000000000004000 RW 0x1000 LOAD 0x000000000004ae00 0x00007fcac1051000 0x00007fcac1051000 0x0000000000006000 0x0000000000006000 RW 0x1000 LOAD 0x0000000000050e00 0x00007fcac1059000 0x00007fcac1059000 0x0000000000018000 0x0000000000018000 RW 0x1000 LOAD 0x0000000000068e00 0x00007fcac1073000 0x00007fcac1073000 0x000000000000e000 0x000000000000e000 RW 0x1000 LOAD 0x0000000000076e00 0x00007fcac1083000 0x00007fcac1083000 0x0000000000003000 0x0000000000003000 RW 0x1000 LOAD 0x0000000000079e00 0x00007fcac1091000 0x00007fcac1091000 0x000000000000c000 0x000000000000c000 RW 0x1000 LOAD 0x0000000000085e00 0x00007fcac109f000 0x00007fcac109f000 0x0000000000001000 0x0000000000001000 RW 0x1000 LOAD 0x0000000000086e00 0x00007fcac10a2000 0x00007fcac10a2000 0x0000000000002000 0x0000000000002000 RW 0x1000 LOAD 0x0000000000088e00 0x00007fcac10a6000 0x00007fcac10a6000 0x000000000000e000 0x000000000000e000 RW 0x1000 LOAD 0x0000000000096e00 0x00007fcac10b6000 0x00007fcac10b6000 0x0000000000004000 0x0000000000004000 RW 0x1000 LOAD 0x000000000009ae00 0x00007fcac10be000 0x00007fcac10be000 0x0000000000002000 0x0000000000002000 RW 0x1000 LOAD 0x000000000009ce00 0x00007fcac10c3000 0x00007fcac10c3000 0x0000000000001000 0x0000000000001000 RW 0x1000 LOAD 0x000000000009de00 0x00007fcac10c8000 0x00007fcac10c8000 0x0000000000008000 0x0000000000008000 RW 0x1000 LOAD 0x00000000000a5e00 0x00007fcac10d2000 0x00007fcac10d2000 0x0000000000018000 0x0000000000018000 RW 0x1000 LOAD 0x00000000000bde00 0x00007fccc1200000 0x00007fccc1200000 0x0000000000008000 0x0000000000008000 RW 0x1000 LOAD 0x00000000000c5e00 0x00007fccc1208000 0x00007fccc1208000 0x0000000000001000 0x0000000000001000 R 0x1000 LOAD 0x00000000000c6e00 0x00007fccc1209000 0x00007fccc1209000 0x0000000000001000 0x0000000000001000 R E 0x1000 LOAD 0x00000000000c7e00 0x00007fccc120a000 0x00007fccc120a000 0x0000000000001000 0x0000000000001000 R 0x1000 LOAD 0x00000000000c8e00 0x00007fccc120b000 0x00007fccc120b000 0x0000000000002000 0x0000000000002000 RW 0x1000 LOAD 0x00000000000cae00 0x00007fccc120f000 0x00007fccc120f000 0x0000000000001000 0x0000000000001000 RW 0x1000 LOAD 0x00000000000cbe00 0x00007fccc1217000 0x00007fccc1217000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000cce00 0x00007fccc1218000 0x00007fccc1218000 0x0000000000002000 0x0000000000002000 R E 0x1000 LOAD 0x00000000000cee00 0x00007fccc121a000 0x00007fccc121a000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000cfe00 0x00007fccc121e000 0x00007fccc121e000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000d0e00 0x00007fccc122e000 0x00007fccc122e000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000d1e00 0x00007fccc123e000 0x00007fccc123e000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000d2e00 0x00007fccc1241000 0x00007fccc1241000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000d3e00 0x00007fccc1244000 0x00007fccc1244000 0x0000000000001000 0x0000000000001000 RW 0x1000 LOAD 0x00000000000d4e00 0x00007fcd01200000 0x00007fcd01200000 0x0000000000001000 0x0000000000001000 R 0x1000 LOAD 0x00000000000d5e00 0x00007fcd01201000 0x00007fcd01201000 0x0000000000002000 0x0000000000002000 R E 0x1000 LOAD 0x00000000000d7e00 0x00007fcd01203000 0x00007fcd01203000 0x0000000000001000 0x0000000000001000 R 0x1000 LOAD 0x00000000000d8e00 0x00007fcd01204000 0x00007fcd01204000 0x0000000000002000 0x0000000000002000 RW 0x1000 LOAD 0x00000000000dae00 0x00007fcd01207000 0x00007fcd01207000 0x0000000000400000 0x0000000000400000 RW 0x1000 LOAD 0x00000000004dae00 0x00007fcd05400000 0x00007fcd05400000 0x000000000004e000 0x000000000004e000 R 0x1000 LOAD 0x0000000000528e00 0x00007fcd0544e000 0x00007fcd0544e000 0x00000000002e9000 0x00000000002e9000 R E 0x1000 LOAD 0x0000000000811e00 0x00007fcd05737000 0x00007fcd05737000 0x00000000000cb000 0x00000000000cb000 R 0x1000 LOAD 0x00000000008dce00 0x00007fcd05802000 0x00007fcd05802000 0x000000000007f000 0x000000000007f000 RW 0x1000 LOAD 0x000000000095be00 0x00007fcd05881000 0x00007fcd05881000 0x0000000000039000 0x0000000000039000 RW 0x1000 LOAD 0x0000000000994e00 0x00007fcd0591b000 0x00007fcd0591b000 0x0000000000001000 0x0000000000001000 R 0x1000 LOAD 0x0000000000995e00 0x00007fcd0591c000 0x00007fcd0591c000 0x0000000000026000 0x0000000000026000 R E 0x1000 LOAD 0x00000000009bbe00 0x00007fcd05942000 0x00007fcd05942000 0x000000000000b000 0x000000000000b000 R 0x1000 LOAD 0x00000000009c6e00 0x00007fcd0594d000 0x00007fcd0594d000 0x0000000000004000 0x0000000000004000 RW 0x1000 LOAD 0x00000000009cae00 0x00007fcd0595b000 0x00007fcd0595b000 0x0000000000002000 0x0000000000002000 R E 0x1000 LOAD 0x00000000009cce00 0x00007ffe60f10000 0x00007ffe60f10000 0x0000000000022000 0x0000000000022000 RW 0x1000 Section to Segment mapping: Segment Sections... 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/libclient.memory_dump_test.dll.so 19 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/libclient.memory_dump_test.dll.so 20 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/libclient.memory_dump_test.dll.so 21 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/libclient.memory_dump_test.dll.so 22 23 24 25 26 27 28 29 30 31 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/simple_app 32 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/simple_app 33 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/simple_app 34 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/simple_app 35 36 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/lib64/debug/libdynamorio.so 37 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/lib64/debug/libdynamorio.so 38 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/lib64/debug/libdynamorio.so 39 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/lib64/debug/libdynamorio.so 40 41 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 42 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 43 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 44 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 45 [vdso] 46 [stack] Issue: #7046
ivankyluk
added a commit
that referenced
this issue
Dec 18, 2024
…re file. (#7144) Align loadable segments to page size in the core file. Based on https://man7.org/linux/man-pages/man5/elf.5.html: p_align This member holds the value to which the segments are aligned in memory and in the file. Loadable process segments must have congruent values for p_vaddr and p_offset, modulo the page size. Values of zero and one mean no alignment is required. Otherwise, p_align should be a positive, integral power of two, and p_vaddr should equal p_offset, modulo p_align. The loabable segments alignment applies to both the address and the offset in the core file. Testing output with readelf -l: ``` readelf -a logs/simple_app.1837029.00000000.elf ELF Header: Magic: 7f 45 4c 46 02 01 01 03 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - GNU ABI Version: 0 Type: CORE (Core file) Machine: Advanced Micro Devices X86-64 Version: 0x1 Entry point address: 0x7fd28488a320 Start of program headers: 64 (bytes into file) Start of section headers: 10432876 (bytes into file) Flags: 0x0 Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 47 Size of section headers: 64 (bytes) Number of section headers: 47 Section header string table index: 46 Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] PROGBITS 00007fd03fe00000 00001000 <<<<<<<<<< 0000000000040000 0000000000000000 WAM 0 0 8 [ 1] PROGBITS 00007fd03fe41000 00041000 0000000000006000 0000000000000000 WAM 0 0 8 [ 2] PROGBITS 00007fd03fe49000 00047000 0000000000004000 0000000000000000 WAM 0 0 8 [ 3] PROGBITS 00007fd03fe51000 0004b000 0000000000006000 0000000000000000 WAM 0 0 8 [ 4] PROGBITS 00007fd03fe59000 00051000 0000000000018000 0000000000000000 WAM 0 0 8 [ 5] PROGBITS 00007fd03fe73000 00069000 000000000000e000 0000000000000000 WAM 0 0 8 [ 6] PROGBITS 00007fd03fe83000 00077000 0000000000003000 0000000000000000 WAM 0 0 8 [ 7] PROGBITS 00007fd03fe91000 0007a000 000000000000c000 0000000000000000 WAM 0 0 8 [ 8] PROGBITS 00007fd03fe9f000 00086000 0000000000001000 0000000000000000 WAM 0 0 8 [ 9] PROGBITS 00007fd03fea2000 00087000 0000000000002000 0000000000000000 WAM 0 0 8 [10] PROGBITS 00007fd03fea6000 00089000 000000000000e000 0000000000000000 WAM 0 0 8 [11] PROGBITS 00007fd03feb6000 00097000 0000000000004000 0000000000000000 WAM 0 0 8 [12] PROGBITS 00007fd03febe000 0009b000 0000000000002000 0000000000000000 WAM 0 0 8 [13] PROGBITS 00007fd03fec3000 0009d000 0000000000001000 0000000000000000 WAM 0 0 8 [14] PROGBITS 00007fd03fec8000 0009e000 0000000000008000 0000000000000000 WAM 0 0 8 [15] PROGBITS 00007fd03fed2000 000a6000 0000000000018000 0000000000000000 WAM 0 0 8 [16] PROGBITS 00007fd240000000 000be000 0000000000008000 0000000000000000 WAM 0 0 8 [17] /usr/local/g[...] PROGBITS 00007fd240008000 000c6000 0000000000001000 0000000000000000 AM 0 0 8 [18] /usr/local/g[...] PROGBITS 00007fd240009000 000c7000 0000000000001000 0000000000000000 AXM 0 0 8 [19] /usr/local/g[...] PROGBITS 00007fd24000a000 000c8000 0000000000001000 0000000000000000 AM 0 0 8 [20] /usr/local/g[...] PROGBITS 00007fd24000b000 000c9000 0000000000002000 0000000000000000 WAM 0 0 8 [21] PROGBITS 00007fd24000f000 000cb000 0000000000001000 0000000000000000 WAM 0 0 8 [22] PROGBITS 00007fd240017000 000cc000 0000000000001000 0000000000000000 WAXM 0 0 8 [23] PROGBITS 00007fd240018000 000cd000 0000000000002000 0000000000000000 AXM 0 0 8 [24] PROGBITS 00007fd24001a000 000cf000 0000000000001000 0000000000000000 WAXM 0 0 8 [25] PROGBITS 00007fd24001e000 000d0000 0000000000001000 0000000000000000 WAXM 0 0 8 [26] PROGBITS 00007fd24002e000 000d1000 0000000000001000 0000000000000000 WAXM 0 0 8 [27] PROGBITS 00007fd24003e000 000d2000 0000000000001000 0000000000000000 WAXM 0 0 8 [28] PROGBITS 00007fd240041000 000d3000 0000000000001000 0000000000000000 WAXM 0 0 8 [29] PROGBITS 00007fd240044000 000d4000 0000000000001000 0000000000000000 WAM 0 0 8 [30] /usr/local/g[...] PROGBITS 00007fd280000000 000d5000 0000000000001000 0000000000000000 AM 0 0 8 [31] /usr/local/g[...] PROGBITS 00007fd280001000 000d6000 0000000000002000 0000000000000000 AXM 0 0 8 [32] /usr/local/g[...] PROGBITS 00007fd280003000 000d8000 0000000000001000 0000000000000000 AM 0 0 8 [33] /usr/local/g[...] PROGBITS 00007fd280004000 000d9000 0000000000002000 0000000000000000 WAM 0 0 8 [34] PROGBITS 00007fd280007000 000db000 0000000000400000 0000000000000000 WAM 0 0 8 [35] /usr/local/g[...] PROGBITS 00007fd284200000 004db000 000000000004f000 0000000000000000 AM 0 0 8 [36] /usr/local/g[...] PROGBITS 00007fd28424f000 0052a000 00000000002e9000 0000000000000000 AXM 0 0 8 [37] /usr/local/g[...] PROGBITS 00007fd284538000 00813000 00000000000cb000 0000000000000000 AM 0 0 8 [38] /usr/local/g[...] PROGBITS 00007fd284603000 008de000 0000000000082000 0000000000000000 WAM 0 0 8 [39] PROGBITS 00007fd284685000 00960000 0000000000039000 0000000000000000 WAM 0 0 8 [40] /usr/lib/x86[...] PROGBITS 00007fd28486f000 00999000 0000000000001000 0000000000000000 AM 0 0 8 [41] /usr/lib/x86[...] PROGBITS 00007fd284870000 0099a000 0000000000026000 0000000000000000 AXM 0 0 8 [42] /usr/lib/x86[...] PROGBITS 00007fd284896000 009c0000 000000000000b000 0000000000000000 AM 0 0 8 [43] /usr/lib/x86[...] PROGBITS 00007fd2848a1000 009cb000 0000000000004000 0000000000000000 WAM 0 0 8 [44] [vdso] PROGBITS 00007fd2848af000 009cf000 0000000000002000 0000000000000000 AXM 0 0 8 [45] [stack] PROGBITS 00007ffcf3d5c000 009d1000 0000000000022000 0000000000000000 WAM 0 0 8 [46] shstrtab STRTAB 0000000000000000 009f3000 000000000000016c 0000000000000000 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings), I (info), L (link order), O (extra OS processing required), G (group), T (TLS), C (compressed), x (unknown), o (OS specific), E (exclude), R (retain), D (mbind), l (large), p (processor specific) There are no section groups in this file. Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align NOTE 0x0000000000000a88 0x0000000000000000 0x0000000000000000 0x0000000000000378 0x0000000000000378 0x2 LOAD 0x0000000000001000 0x00007fd03fe00000 0x00007fd03fe00000 0x0000000000040000 0x0000000000040000 RW 0x1000 LOAD 0x0000000000041000 0x00007fd03fe41000 0x00007fd03fe41000 0x0000000000006000 0x0000000000006000 RW 0x1000 LOAD 0x0000000000047000 0x00007fd03fe49000 0x00007fd03fe49000 0x0000000000004000 0x0000000000004000 RW 0x1000 LOAD 0x000000000004b000 0x00007fd03fe51000 0x00007fd03fe51000 0x0000000000006000 0x0000000000006000 RW 0x1000 LOAD 0x0000000000051000 0x00007fd03fe59000 0x00007fd03fe59000 0x0000000000018000 0x0000000000018000 RW 0x1000 LOAD 0x0000000000069000 0x00007fd03fe73000 0x00007fd03fe73000 0x000000000000e000 0x000000000000e000 RW 0x1000 LOAD 0x0000000000077000 0x00007fd03fe83000 0x00007fd03fe83000 0x0000000000003000 0x0000000000003000 RW 0x1000 LOAD 0x000000000007a000 0x00007fd03fe91000 0x00007fd03fe91000 0x000000000000c000 0x000000000000c000 RW 0x1000 LOAD 0x0000000000086000 0x00007fd03fe9f000 0x00007fd03fe9f000 0x0000000000001000 0x0000000000001000 RW 0x1000 LOAD 0x0000000000087000 0x00007fd03fea2000 0x00007fd03fea2000 0x0000000000002000 0x0000000000002000 RW 0x1000 LOAD 0x0000000000089000 0x00007fd03fea6000 0x00007fd03fea6000 0x000000000000e000 0x000000000000e000 RW 0x1000 LOAD 0x0000000000097000 0x00007fd03feb6000 0x00007fd03feb6000 0x0000000000004000 0x0000000000004000 RW 0x1000 LOAD 0x000000000009b000 0x00007fd03febe000 0x00007fd03febe000 0x0000000000002000 0x0000000000002000 RW 0x1000 LOAD 0x000000000009d000 0x00007fd03fec3000 0x00007fd03fec3000 0x0000000000001000 0x0000000000001000 RW 0x1000 LOAD 0x000000000009e000 0x00007fd03fec8000 0x00007fd03fec8000 0x0000000000008000 0x0000000000008000 RW 0x1000 LOAD 0x00000000000a6000 0x00007fd03fed2000 0x00007fd03fed2000 0x0000000000018000 0x0000000000018000 RW 0x1000 LOAD 0x00000000000be000 0x00007fd240000000 0x00007fd240000000 0x0000000000008000 0x0000000000008000 RW 0x1000 LOAD 0x00000000000c6000 0x00007fd240008000 0x00007fd240008000 0x0000000000001000 0x0000000000001000 R 0x1000 LOAD 0x00000000000c7000 0x00007fd240009000 0x00007fd240009000 0x0000000000001000 0x0000000000001000 R E 0x1000 LOAD 0x00000000000c8000 0x00007fd24000a000 0x00007fd24000a000 0x0000000000001000 0x0000000000001000 R 0x1000 LOAD 0x00000000000c9000 0x00007fd24000b000 0x00007fd24000b000 0x0000000000002000 0x0000000000002000 RW 0x1000 LOAD 0x00000000000cb000 0x00007fd24000f000 0x00007fd24000f000 0x0000000000001000 0x0000000000001000 RW 0x1000 LOAD 0x00000000000cc000 0x00007fd240017000 0x00007fd240017000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000cd000 0x00007fd240018000 0x00007fd240018000 0x0000000000002000 0x0000000000002000 R E 0x1000 LOAD 0x00000000000cf000 0x00007fd24001a000 0x00007fd24001a000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000d0000 0x00007fd24001e000 0x00007fd24001e000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000d1000 0x00007fd24002e000 0x00007fd24002e000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000d2000 0x00007fd24003e000 0x00007fd24003e000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000d3000 0x00007fd240041000 0x00007fd240041000 0x0000000000001000 0x0000000000001000 RWE 0x1000 LOAD 0x00000000000d4000 0x00007fd240044000 0x00007fd240044000 0x0000000000001000 0x0000000000001000 RW 0x1000 LOAD 0x00000000000d5000 0x00007fd280000000 0x00007fd280000000 0x0000000000001000 0x0000000000001000 R 0x1000 LOAD 0x00000000000d6000 0x00007fd280001000 0x00007fd280001000 0x0000000000002000 0x0000000000002000 R E 0x1000 LOAD 0x00000000000d8000 0x00007fd280003000 0x00007fd280003000 0x0000000000001000 0x0000000000001000 R 0x1000 LOAD 0x00000000000d9000 0x00007fd280004000 0x00007fd280004000 0x0000000000002000 0x0000000000002000 RW 0x1000 LOAD 0x00000000000db000 0x00007fd280007000 0x00007fd280007000 0x0000000000400000 0x0000000000400000 RW 0x1000 LOAD 0x00000000004db000 0x00007fd284200000 0x00007fd284200000 0x000000000004f000 0x000000000004f000 R 0x1000 LOAD 0x000000000052a000 0x00007fd28424f000 0x00007fd28424f000 0x00000000002e9000 0x00000000002e9000 R E 0x1000 LOAD 0x0000000000813000 0x00007fd284538000 0x00007fd284538000 0x00000000000cb000 0x00000000000cb000 R 0x1000 LOAD 0x00000000008de000 0x00007fd284603000 0x00007fd284603000 0x0000000000082000 0x0000000000082000 RW 0x1000 LOAD 0x0000000000960000 0x00007fd284685000 0x00007fd284685000 0x0000000000039000 0x0000000000039000 RW 0x1000 LOAD 0x0000000000999000 0x00007fd28486f000 0x00007fd28486f000 0x0000000000001000 0x0000000000001000 R 0x1000 LOAD 0x000000000099a000 0x00007fd284870000 0x00007fd284870000 0x0000000000026000 0x0000000000026000 R E 0x1000 LOAD 0x00000000009c0000 0x00007fd284896000 0x00007fd284896000 0x000000000000b000 0x000000000000b000 R 0x1000 LOAD 0x00000000009cb000 0x00007fd2848a1000 0x00007fd2848a1000 0x0000000000004000 0x0000000000004000 RW 0x1000 LOAD 0x00000000009cf000 0x00007fd2848af000 0x00007fd2848af000 0x0000000000002000 0x0000000000002000 R E 0x1000 LOAD 0x00000000009d1000 0x00007ffcf3d5c000 0x00007ffcf3d5c000 0x0000000000022000 0x0000000000022000 RW 0x1000 Section to Segment mapping: Segment Sections... 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/libclient.memory_dump_test.dll.so 19 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/libclient.memory_dump_test.dll.so 20 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/libclient.memory_dump_test.dll.so 21 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/libclient.memory_dump_test.dll.so 22 23 24 25 26 27 28 29 30 31 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/simple_app 32 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/simple_app 33 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/simple_app 34 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/suite/tests/bin/simple_app 35 36 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/lib64/debug/libdynamorio.so 37 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/lib64/debug/libdynamorio.so 38 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/lib64/debug/libdynamorio.so 39 /usr/local/google/home/kyluk/trace2checkpoint/dynamorio/build/lib64/debug/libdynamorio.so 40 41 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 42 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 43 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 44 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 45 [vdso] 46 [stack] There is no dynamic section in this file. There are no relocations in this file. No processor specific unwind information to decode No version information found in this file. Displaying notes found at file offset 0x00000a88 with length 0x00000378: Owner Data size Description CORE 0x00000150 NT_PRSTATUS (prstatus structure) CORE 0x00000200 NT_FPREGSET (floating point registers) ``` Without the padding, the offset of the first section may not be page size aligned, i.e. 0xe00 in the following case: ``` Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] PROGBITS 00007f0018e00000 00000e00 <<<<<<<<<< 0000000000040000 0000000000000000 WAM 0 0 8 ``` Issue: #7046
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
dr_create_memory_dump does not support Linux.
Describe the solution you'd like
Add Linux support to dr_create_memory_dump which dumps memory in ELF format.
The text was updated successfully, but these errors were encountered: