[ELF][MIPS] Set EI_ABIVERSION flag accordingly to MIPS ABIs requirement
authorSimon Atanasyan <simon@atanasyan.com>
Fri, 23 Feb 2018 11:28:57 +0000 (11:28 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Fri, 23 Feb 2018 11:28:57 +0000 (11:28 +0000)
commita4cde9d2e22308381cefeda7e8e8ccd4a48fc19d
treeaed664d0b2e31cb7ed6a1b2cfdd1a391a05aee80
parentfac93e28f066b6a25b480c0d4334f94473ea1571
[ELF][MIPS] Set EI_ABIVERSION flag accordingly to MIPS ABIs requirement

MIPS ABIs require that if an executable file uses non-PIC model, the
EI_ABIVERSION entry in the ELF header should be incremented from 0 to 1.
That allows obsoleted / limited dynamic linkers refuse to link them.

llvm-svn: 325890
lld/ELF/Writer.cpp
lld/test/ELF/basic-mips.s
lld/test/ELF/emulation.s
lld/test/ELF/mips-elf-abi.s [new file with mode: 0644]