In case of using 32-bit GOT access to the table requires two instructions with attached %got_hi and %got_lo relocations. This patch implements correct expansion of 'lw/sw' instructions in that case.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/MC/Mips/mips64-expansions.s | ||
---|---|---|
3 | Good catch. I'll fix that. | |
506 | Yes. The xgot flag does not affect taking address of local symbol. For global symbols with xgot flag we generate a pair of %got_hi/%got_lo relocations like the getAddrGlobalLargeGOT does. Without xgot flag we generate %got_disp in 64-bit case and %got in 32-bit case like the getAddrGlobal does. |
llvm/trunk/test/MC/Mips/mips64-expansions.s | ||
---|---|---|
91 ↗ | (On Diff #220726) |
Missed that sym is local. |
Missing run line with -mattr=+xgot.