This patch adds a few extra cases to the existing testing for eh_frame and eh_frame_hdr behaviour in LLD. They all come from a private testsuite we are trying to migrate to lit.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lld/test/ELF/eh-frame-hdr-comdat.s | ||
---|---|---|
14 | 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 } } } | |
lld/test/ELF/eh-frame-type.test | ||
1 | Use yaml2obj -DTYPE=SHT_X86_64_UNWIND instead? |
Address review comments:
- Use full output for eh_frame_hdr check (also match up addresses to show the output is correct).
- Changed comment marker.
- Used yaml2obj -D option.
- Removed extraneous unique directive caused by copy/paste.
lld/test/ELF/eh-frame-hdr-comdat.s | ||
---|---|---|
4 | -unknown-linux can be omitted (we are testing generic ELF behavior, not specific to Linux) |
Tidy up YAML, add additional case for mixing .eh_frame of different types and simplify llvm-mc call.
-unknown-linux can be omitted (we are testing generic ELF behavior, not specific to Linux)