[PATCH] D23161: [ELF][MIPS] Produce a correct and complete set of MIPS ELF header flags

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 05:39:26 PDT 2016


atanasyan created this revision.
atanasyan added reviewers: ruiu, rafael.
atanasyan added a subscriber: llvm-commits.
atanasyan set the repository for this revision to rL LLVM.
atanasyan added a project: lld.
Herald added a subscriber: sdardis.

The patch extends the `getMipsEFlags` function. Now in that function we iterate over all object files, parse ELF header flags and merge them. If a file is incompatible with previously analyzed ones we show an error or warning. That can happen if, for example, we try to link files with incompatible ABI, ISA, NAN encoding etc.

There is an alternative solution. We can check and merge flags and reject incompatible input modules in the `isCompatible` function which is called from the `SymbolTable::addFile` method. But in that case we have to save and keep somewhere a merged ELF flags combination to use it later in the writer.

Repository:
  rL LLVM

https://reviews.llvm.org/D23161

Files:
  ELF/Writer.cpp
  test/ELF/mips-elf-flags-err.s
  test/ELF/mips-elf-flags.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23161.66791.patch
Type: text/x-patch
Size: 9125 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160804/f6814037/attachment.bin>


More information about the llvm-commits mailing list