[PATCH] D60773: [llvm-objcopy] Support full list of bfd targets that lld uses.

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 08:45:21 PDT 2019


rupprecht added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/CopyConfig.cpp:277
     // Name, {EMachine, OSABI, 64bit, LittleEndian}
     {"elf32-i386", {ELF::EM_386, ELF::ELFOSABI_NONE, false, true}},
+    {"elf32-iamcu", {ELF::EM_IAMCU, ELF::ELFOSABI_NONE, false, true}},
----------------
jhenderson wrote:
> arichardson wrote:
> > All of these now use `ELF::ELFOSABI_NONE`. I wonder if we can remove the `ELF::ELFOSABI_NONE` from the initializer by adding a constructor with three arguments or making it the last member of the struct and adding a default initializer.
> +1 to this. That was how it used to be before I added the freebsd support recently.
Sure... I ended up with three constructors, in part because we need a default constructor to have a plain "MachineInfo BinaryFormat" member of CopyConfig. The constructor is a little ugly but it does make this part look nicer :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60773/new/

https://reviews.llvm.org/D60773





More information about the llvm-commits mailing list