Recently, support was added to yaml2obj to allow dynamic sections to have a list of entries, to make it easier to write tests with dynamic sections. However, this change also removed the abiltiy to provide custom contents to the dynamic section, making it hard to test malformed contents (e.g. because the section is valid size to contain an array of entries). This change reinstates this. An error is emitted if raw content and dynamic entries are both specified.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with a minor nit.
test/tools/yaml2obj/dynamic-section-raw-content.yaml | ||
---|---|---|
21 | Could you group (move closer) the invocations and check lines? # RUN: yaml2obj --docnum=1 %s -o %t1 # RUN: llvm-readobj -x .dynamic --sections %t1 | FileCheck %s --check-prefix=RAW # RAW: Name: .dynamic # RAW-NEXT: Type: SHT_DYNAMIC # RAW-NEXT: Flags [ # RAW-NEXT: ] # RAW-NEXT: Address: # RAW-NEXT: Offset: # RAW-NEXT: Size: 5 # RAW: Hex dump of section '.dynamic': # RAW-NEXT: 0x00000000 01234567 89 {{.*}} # RUN: not yaml2obj --docnum=2 %s -o %t2 2>&1 | FileCheck %s --check-prefix=ERR # ERR: Cannot specify both raw content and explicit entries for dynamic section '.dynamic'. |
Could you group (move closer) the invocations and check lines?
i.e: