pkarashchenko commented on PR #11322: URL: https://github.com/apache/nuttx/pull/11322#issuecomment-1845866376
Not sure if this is related, but recently I faced an issue of relocation truncation (with static linking of course) for RV64 arch when referenced symbol address had "sign bit" set (`0x80000000` bit set), so RV64 compiler populates the sign bit and address starts looking `0xffffffff80000000`. To overcome this I had to use a trick of masking sign bit from symbol label at compile time and then adding assembly instructions to restore it back after `%pcrel_hi(symbol-0x80000000)` value loaded to the register. Sorry for spamming here, but I spent fair amount of time to actually understand this non-logical behaviour of RV64 ISA that does not have instruction to say that I want to load `%pcrel_hi(symbol)` value as unsigned. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org