This is an archive of the discontinued LLVM Phabricator instance.

Allow oformat option to accept elf format
ClosedPublic

Authored by rdhindsa on Jul 31 2018, 2:34 PM.

Details

Summary

Allow oformat to accept format starting with elf as acceptable format. isOutputFormatBinary returns false in such case.
Example: --oformat elf64-x86-64

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

rdhindsa created this revision.Jul 31 2018, 2:34 PM
ruiu added inline comments.Jul 31 2018, 2:37 PM
lld/test/ELF/oformat-elf.s
7 ↗(On Diff #158388)

I don't think you have to verify the output because -oformat elf is essentially ignored. Please add one test line like this

  1. RUN: ld.lld -o /dev/null %t --oformat elf

to oformat-binary.s to verify that the command succeeds to complete.

rdhindsa updated this revision to Diff 158390.Jul 31 2018, 2:44 PM
rdhindsa marked an inline comment as done.
ruiu accepted this revision.Jul 31 2018, 2:51 PM

LGTM

This revision is now accepted and ready to land.Jul 31 2018, 2:51 PM
This revision was automatically updated to reflect the committed changes.