[PATCH v2 3/5] LoongArch: opcodes: Add support for tls le relax.

mengqinggang mengqinggang@loongson.cn
Tue Dec 5 09:13:17 GMT 2023


在 2023/12/5 上午11:59, Xi Ruoyao 写道:
> On Tue, 2023-12-05 at 09:36 +0800, mengqinggang wrote:
>>> You can always write
>>>
>>> .reloc 0, R_LARCH_LE_ADD_R, a
>>> add.d $t0, $t0, $tp
>>
>> We need to set the offset of .reloc, but gcc may not get a accurate offset
>> relative to the section.
> Sorry, I mean ".reloc ., R_LARCH_LE_ADD_R, a", not ".reloc 0".


It  looks good, we will implement based on this.


>
> And if you must go with an additional operand of add.d you should make
> sure things like "add.d $t0, $t0, $t1, 114" or "add.d $t0, $t0, $t1,
> %lo12(x)" rejected with a reasonable message (not an internal error, nor
> an abort, nor silently producing broken binary).
>



More information about the Binutils mailing list