This is an archive of the discontinued LLVM Phabricator instance.

[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections.
ClosedPublic

Authored by grimar on Oct 2 2019, 6:37 AM.

Diff Detail

Event Timeline

grimar created this revision.Oct 2 2019, 6:37 AM
MaskRay added inline comments.Oct 2 2019, 7:57 AM
include/llvm/ObjectYAML/ELFYAML.h
261

{}; -> {}

test/tools/yaml2obj/elf-llvm-addrsig-section.yaml
200

Right shift 123{{$}}

jhenderson added inline comments.Oct 2 2019, 8:19 AM
include/llvm/ObjectYAML/ELFYAML.h
261–263

clang-format?

264

I'd find it easier to read if there were a blank line between the methods and member variables.

test/tools/obj2yaml/elf-llvm-addrsig-section.yaml
5

dumps -> dumping

6

when it can't match

I'd delete "found"

57

Delete "malformed"

58–59

broken, e.g. because the entry contains a malformed

62

I might use the prefix "INVALID-ENTRY"

80

obj2yaml produces a "Symbols" tag when describing an ...

test/tools/yaml2obj/elf-llvm-addrsig-section.yaml
4

using the "Symbols" tag

118

I'm not really sure what "Symbol"->"Index" is trying to say. Perhaps it could be written as follows: "Check that the maximum symbol index size is 32 bits."

This actually shows that an error is produced if the value is out of range. You should have a separate case without the error, using the maximum possible value.

136

the "Content" tag

159

"for SHT_LLVM_ADDRSIG sections." here and elsewhere.

tools/obj2yaml/elf2yaml.cpp
871

Whilst you're moving code around, I'd improve this comment slightly:
"Get symbol with index sh_info. This symbol's name is the signature of the group.

grimar updated this revision to Diff 222988.Oct 3 2019, 5:25 AM
grimar marked 17 inline comments as done.
  • Addressed review comments.
include/llvm/ObjectYAML/ELFYAML.h
261–263

(It was formatted.. but because of excessive ';' which I've removed, formatting did't add a space between ')' and '{').

test/tools/yaml2obj/elf-llvm-addrsig-section.yaml
118

This actually shows that an error is produced if the value is out of range. You should have a separate case without the error, using the maximum possible value.

I've included it to SYMBOL-INDEX test.

This revision is now accepted and ready to land.Oct 3 2019, 6:05 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2019, 6:55 AM
RKSimon added a subscriber: RKSimon.Oct 3 2019, 8:12 AM

@grimar elf-llvm-addrsig-section.yaml is failing on EXPENSIVE_CHECKS builds please can you take a look?

http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/19989/

grimar added a comment.Oct 3 2019, 8:15 AM

@grimar elf-llvm-addrsig-section.yaml is failing on EXPENSIVE_CHECKS builds please can you take a look?

http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/19989/

Yep, sorry for this. I`ve reverted it and recommitted with a fix in rL373606 recently. Should be fixed now.