This is an archive of the discontinued LLVM Phabricator instance.

[RL78 patch 1] Add RL78 ELF defintions
AcceptedPublic

Authored by SebastianPerta on Jun 18 2023, 3:04 AM.

Details

Summary

Add file with RL78 ELF relocations. Add RL78 support to ELF.h,
ELFObject.h and ELFYAML.cpp. Add simple test of RL78 ELF representation in YAML.

Please note this patch depends on the triple being defined which is done in first patch:
https://reviews.llvm.org/D150693

Diff Detail

Event Timeline

SebastianPerta created this revision.Jun 18 2023, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2023, 3:04 AM
SebastianPerta requested review of this revision.Jun 18 2023, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2023, 3:04 AM
SebastianPerta set the repository for this revision to rG LLVM Github Monorepo.Jun 18 2023, 3:05 AM
arsenm accepted this revision.Jun 18 2023, 10:03 AM
This revision is now accepted and ready to land.Jun 18 2023, 10:03 AM
MaskRay added inline comments.Jun 18 2023, 5:19 PM
llvm/include/llvm/BinaryFormat/ELFRelocs/RL78.def
54

No newline at end of file. Please add one

llvm/test/tools/llvm-readobj/ELF/reloc-types-rl78.test
1

Seems to wrap too early.

llvm/test/tools/llvm-readobj/ELF/rl78-header-flags.test
1

Complete sentences in comments should end with a period. Fix this throughout.

jhenderson added inline comments.Jun 18 2023, 11:54 PM
llvm/include/llvm/BinaryFormat/ELF.h
919

Typo?

921
llvm/test/tools/llvm-readobj/ELF/rl78-header-flags.test
4

It seems to me like we should have at least a token llvm-readelf/--elf-output-style=GNU test case, as the two code paths start off separately. We need to show that they both recognise the new flags. It may not be necessary to check every single case though.

Up to you, but you could somewhat simplify this test by simply have yaml2obj create the input object with all the flags set at once. You then only need one yaml2obj and one llvm-readobj lines.

This comment was removed by mehdi_amini.