[PATCH] D82852: [ELF][test] Add some additional eh_frame/eh_frame_hdr testing

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 04:18:58 PDT 2020


grimar added inline comments.


================
Comment at: lld/test/ELF/eh-frame-hdr-comdat.s:14
+# CHECK-NEXT: 200158 011b033b 14000000 01000000
+##                                     ^ FDE count
+
----------------
Perhaps show the full output? (it is not that clear what is the "garbage" you're reffering to. Given that there is no garbage in the output, showing the full output is probably better).

```
Contents of section .eh_frame_hdr:
 200158 011b033b 14000000 01000000 4c100000
 200168 30000000
```

Or may be it is even better to use `llvm-readobj -u`, which shows both size and the number of FDEs (and explains all fields):

```
EHFrameHeader {
  Address: 0x200158
  Offset: 0x158
  Size: 0x14
  Corresponding Section: .eh_frame_hdr
  Header {
    version: 1
    eh_frame_ptr_enc: 0x1b
    fde_count_enc: 0x3
    table_enc: 0x3b
    eh_frame_ptr: 0x200170
    fde_count: 1
    entry 0 {
      initial_location: 0x2011a4
      address: 0x200188
    }
  }
}
```



================
Comment at: lld/test/ELF/eh-frame-type.test:1
-# RUN: yaml2obj %s -o %t.o
-# RUN: ld.lld %t.o -o %t -shared
-# RUN: llvm-readobj -S %t | FileCheck %s
+# RUN: yaml2obj %s -o %t1.o --docnum=1
+# RUN: ld.lld %t1.o -o %t1 -shared
----------------
Use yaml2obj -DTYPE=SHT_X86_64_UNWIND instead?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82852/new/

https://reviews.llvm.org/D82852





More information about the llvm-commits mailing list