[mips] Implement generation of relocations "chains" used by N32 ABI
authorSimon Atanasyan <simon@atanasyan.com>
Thu, 21 Sep 2017 14:04:53 +0000 (14:04 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Thu, 21 Sep 2017 14:04:53 +0000 (14:04 +0000)
commitede43b71f802ad65c030557876939bcc1f7636b8
tree30d14b9ac3a47c78e1c1294e5ccdd937acc7db27
parent9f676a7798cc7f2ee61513c94c59ad699341a109
[mips] Implement generation of relocations "chains" used by N32 ABI

In case of using a "nested" relocation expressions like this
`%hi(%neg(%gp_rel()))`, N32 ABI requires generation of three consecutive
relocations. That differs from the N64 ABI case where all relocations
are packed into the single relocation record.

llvm-svn: 313879
llvm/lib/MC/ELFObjectWriter.cpp
llvm/test/MC/Mips/elf-N32.s [new file with mode: 0644]