Unhandled relocation type of 'R_X86_64_IRELATIVE'

29 views
Skip to first unread message

Deepak Krishnan

unread,
Aug 10, 2023, 2:30:15 AM8/10/23
to OSv Development
Hi,

I was playing around with OSv and came across an .so file with a ''R_X86_64_IRELATIVE' entry in PLTGOT - which seems to be crashing OSv because of this assert in core/elf.cc:relocate_pltgot() : assert(type == ARCH_JUMP_SLOT || type == ARCH_TLSDESC)

The binary itself seems to have been built using GCC 7.3.0 and isn't anything special as far as I can see. What's the reason behind the assert there? Is an IRELATIVE type relocation not expected or is it simply unhandled?

Thank You in advance.

-Deepak

Waldek Kozaczuk

unread,
Aug 10, 2023, 5:59:13 PM8/10/23
to Deepak Krishnan, OSv Development
Hi,


Yes indeed OSv does not support this relocation at this time. 

However I am working on the changes to support static executables that include adding support of these relocations. I should be sending corresponding PR soon. 

Regards,
Waldek

--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/3ef4fbbb-2d8a-4aa5-8254-54eb742e613fn%40googlegroups.com.

Waldek Kozaczuk

unread,
Aug 13, 2023, 2:41:18 PM8/13/23
to OSv Development
Hi,

I have created a pull request that should address this - https://github.com/cloudius-systems/osv/pull/1245. Please give it a try and let me know.

Waldek

Reply all
Reply to author
Forward
0 new messages