diff options
| author | Roger Kim <rgr@fb.com> | 2022-02-11 19:33:23 -0500 |
|---|---|---|
| committer | Jez Ng <jezng@fb.com> | 2022-02-11 19:42:20 -0500 |
| commit | 4f2c46c35ccd17ef726c4b4e8e9500d7972e757a (patch) | |
| tree | a1da30c7657f5826010e90aff0bb84ed8e97a069 /lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py | |
| parent | 6759cdd82918e186ded1eda1a86b47e13469a811 (diff) | |
Print C-string literals in mapfile
This diff has the C-string literals printed into the mapfile in the symbol table like how ld64 does.
Here is what ld64's mapfile looks like with C-string literals:
```
# Path: out
# Arch: x86_64
# Object files:
[ 0] linker synthesized
[ 1] foo.o
# Sections:
# Address Size Segment Section
0x100003F7D 0x0000001D __TEXT __text
0x100003F9A 0x0000001E __TEXT __cstring
0x100003FB8 0x00000048 __TEXT __unwind_info
# Symbols:
# Address Size File Name
0x100003F7D 0x0000001D [ 1] _main
0x100003F9A 0x0000000E [ 1] literal string: Hello world!\n
0x100003FA8 0x00000010 [ 1] literal string: Hello, it's me\n
0x100003FB8 0x00000048 [ 0] compact unwind info
```
Here is what the new lld's Mach-O mapfile looks like:
```
# Path: /Users/rgr/local/llvm-project/build/Debug/tools/lld/test/MachO/Output/map-file.s.tmp/c-string-liter
al-out
# Arch: x86_64
# Object files:
[ 0] linker synthesized
[ 1] /Users/rgr/local/llvm-project/build/Debug/tools/lld/test/MachO/Output/map-file.s.tmp/c-string-literal
.o
# Sections:
# Address Size Segment Section
0x1000002E0 0x0000001D __TEXT __text
0x1000002FD 0x0000001D __TEXT __cstring
# Symbols:
# Address File Name
0x1000002E0 [ 1] _main
0x1000002FD [ 1] literal string: Hello world!\n
0x10000030B [ 1] literal string: Hello, it's me\n
```
Reviewed By: #lld-macho, int3
Differential Revision: https://reviews.llvm.org/D118077
Diffstat (limited to 'lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py')
0 files changed, 0 insertions, 0 deletions
