This is an archive of the discontinued LLVM Phabricator instance.

[MC] Allow overriding whether to output Elf_Rel or Elf_Rela relocations
Needs ReviewPublic

Authored by arichardson on Feb 2 2018, 2:52 AM.

Details

Summary

This makes it possible to test that tools correctly deal with REL vs RELA
differences in input files. In D42790 I am trying to fix LLD not writing
addends if the default output format uses Elf_Rel but an input contains
relocations in the Elf_Rela format. In order to test this I need to create
object files that use a different relocation format from the output.

Diff Detail