[llvm] r205200 - [mips] Implement missing relocations in the integrated assembler.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Mar 31 09:49:04 PDT 2014


From

http://www.linux-mips.org/pub/linux/mips/doc/ABI/psABI_mips3.0.pdf

It looks like R_MIPS_HI16 must be immediately followed by the
"corresponding" LO16. It is not exactly clear what "corresponding"
means. Does it need to use the same symbol?

In the testcase the relocations are  R_MIPS_CALL_HI16 and
R_MIPS_CALL_LO16. Is it an undocumented requirement that the same
restriction applies to them?


On 31 March 2014 12:24, Daniel Sanders <Daniel.Sanders at imgtec.com> wrote:
> I'll have to look into this (or Simon might know).  When I read the test, it seemed obvious to me that the relocations would be emitted in the order they were read in the input file but it appears that gas isn't doing that.
>
> Thanks for pointing that out.
>
>> -----Original Message-----
>> From: Rafael EspĂ­ndola [mailto:rafael.espindola at gmail.com]
>> Sent: 31 March 2014 17:08
>> To: Daniel Sanders
>> Cc: llvm-commits
>> Subject: Re: [llvm] r205200 - [mips] Implement missing relocations in the
>> integrated assembler.
>>
>> >  // Check that the appropriate relocations were created.
>> >  // For the xgot case we want to see R_MIPS_[GOT|CALL]_[HI|LO]16.
>> >
>> > @@ -12,8 +9,8 @@
>> >  // CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT_HI16
>> >  // CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT_LO16
>> >  // CHECK:     0x{{[0-9,A-F]+}} R_MIPS_CALL_HI16
>> > -// CHECK:     0x{{[0-9,A-F]+}} R_MIPS_CALL_LO16
>> >  // CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT16
>> > +// CHECK:     0x{{[0-9,A-F]+}} R_MIPS_CALL_LO16
>> >  // CHECK:     0x{{[0-9,A-F]+}} R_MIPS_LO16
>> >  // CHECK: ]
>>
>> I get a different relocation order with gas. Are the order restrictions
>> documented anywhere? Could a link to that document be added to
>> http://llvm.org/docs/CompilerWriterInfo.html?
>>
>> Cheers,
>> Rafael




More information about the llvm-commits mailing list