Now the parser supports %got(sym) expressions only but %got(sym + const) variant is also valid and accepted by GAS.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM, but can you make the test more specific? The current one passes if I change 1004 to 1003 for example.
Comment Actions
Thanks for review.
Do you change first or second or both 0x10004? If you change only the first one in the lw instruction, it is expected that the test passes because %got() takes upper 16-bits of the value. I use two instructions and two relocations in the test because such pair of relocations is a common case in the code.