[PATCH] D88468: [llvm-readobj] Fix error when printing out stabs symbols of type N_OSO
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 00:41:46 PDT 2020
grimar added inline comments.
================
Comment at: llvm/test/tools/llvm-readobj/MachO/stabs.yaml:120
+ filetype: 0x00000002
+ ncmds: 8
+ sizeofcmds: 744
----------------
I was able to quickly reduce the number of commands here to `2` by simple removing of unused parts:
```
ncmds: 2
...
LoadCommands:
- cmd: LC_SEGMENT_64
cmdsize: 232
segname: __TEXT
vmaddr: 4294967296
vmsize: 4096
fileoff: 0
filesize: 4096
maxprot: 5
initprot: 5
nsects: 1
flags: 0
Sections:
- sectname: __text
segname: __TEXT
addr: 0x0000000100000FA0
size: 15
offset: 0x00000FA0
align: 4
reloff: 0x00000000
nreloc: 0
flags: 0x80000400
reserved1: 0x00000000
reserved2: 0x00000000
reserved3: 0x00000000
content: 554889E531C0C745FC000000005DC3
- cmd: LC_SYMTAB
cmdsize: 24
symoff: 4152
nsyms: 11
stroff: 4328
strsize: 104
```
================
Comment at: llvm/test/tools/llvm-readobj/MachO/stabs.yaml:209
+LinkEditData:
+ ExportTrie:
+ TerminalSize: 0
----------------
I was able to remove the whole `ExportTrie` description.
================
Comment at: llvm/tools/llvm-readobj/MachODumper.cpp:287
+ case MachO::N_ECOML:
+ return true;
+ default:
----------------
I was able to comment out few cases:
```
switch (Type) {
case MachO::N_FUN:
//case MachO::N_STSYM:
//case MachO::N_LCSYM:
case MachO::N_BNSYM:
//case MachO::N_SLINE:
case MachO::N_ENSYM:
case MachO::N_SO:
//case MachO::N_SOL:
//case MachO::N_ENTRY:
//case MachO::N_ECOMM:
//case MachO::N_ECOML:
return true;
default:
return false;
```
And the test case passed for me. I think it means these cases are not tested properly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88468/new/
https://reviews.llvm.org/D88468
More information about the llvm-commits
mailing list