This is an archive of the discontinued LLVM Phabricator instance.

[yaml2obj] - Allow overriding sh_name fields of the sections.
ClosedPublic

Authored by grimar on Aug 30 2019, 5:14 AM.

Details

Summary

This is in line with the previous changes which allowed to override the sh_offset/sh_size
and should be useful for writing the test cases.
(I am going to use it for writing a test case for D66976).

Diff Detail

Event Timeline

grimar created this revision.Aug 30 2019, 5:14 AM
jhenderson added inline comments.Aug 30 2019, 5:38 AM
include/llvm/ObjectYAML/ELFYAML.h
150

what -> which

153

in the sh_name

Perhaps worth mentioning that it does not affect the name stored in the string table.

test/tools/yaml2obj/elf-override-shname.yaml
2

set a custom

grimar updated this revision to Diff 218096.Aug 30 2019, 7:15 AM
grimar marked 4 inline comments as done.
  • Addressed review comments.
include/llvm/ObjectYAML/ELFYAML.h
153

it does not affect the name stored in the string table

I updated the test case to demonstrate this.

jhenderson accepted this revision.Aug 30 2019, 7:18 AM

LGTM, with nit.

include/llvm/ObjectYAML/ELFYAML.h
154

Nit: missing trailing full stop

This revision is now accepted and ready to land.Aug 30 2019, 7:18 AM
MaskRay accepted this revision.Aug 30 2019, 7:32 AM
MaskRay added inline comments.
lib/ObjectYAML/ELFEmitter.cpp
400

// Override the fields if requested.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2019, 2:47 AM