Now the asm parser supports %tprel_hi/lo and %dtprel_hi/lo relocations with a symbol argument only. But expressions like sym + const are valid also and accepted by GAS.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Do not right shift addend for DTPREL_HI and TPREL_HI relocations to mimics GAS behavior and LD expectations.
Comment Actions
Sorry for the delay in looking at this. I wasn't able to comment until I'd found some information on how they were expected to behave.
I see you've just abandoned the revision but it LGTM on the basis that the odd addends work the same way as GAS does.
test/MC/Mips/tprel-hi-lo-expr.s | ||
---|---|---|
10 | GAS does the same thing but is this addend really correct? I'd have expected to get 'lui $3, 0' since the offset is in the low 16-bits but '$loc0+0x7ffc' seems to be interpreted as '$loc0+0x7ffc0000' |
GAS does the same thing but is this addend really correct? I'd have expected to get 'lui $3, 0' since the offset is in the low 16-bits but '$loc0+0x7ffc' seems to be interpreted as '$loc0+0x7ffc0000'