Opened 5 years ago

Last modified 4 years ago

#15432 new bug

runtime_loader doesn't support R_X86_64_TPOFF64 relocation

Reported by: KapiX Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/runtime_loader Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I tried running WebKit test suite on 64-bit version, but jsc and DumpRenderTree don't run with Bad data from runtime loader.

At least jsc contains R_X86_64_TPOFF64 relocation.

Change History (1)

comment:1 by KapiX, 4 years ago

After some more investigation, it turns out it's a result of tls-model=initial-exec. My understanding is that this is Static TLS and Haiku doesn't support it at all.

For files compiled with -fPIC tls-model is set to global-dynamic, but as soon as any file in compiled executable doesn't have it global-dynamic is overridden.

WebKit has CMAKE_POSITION_INDEPENDENT_CODE ON, which adds -fPIC to shared libraries and -fPIE to executables. For example jsc.cpp got PIE flag, which caused the executable to be built with initial-exec TLS. When CMake flag gets disabled and -fPIC is added manually, resulting executables have R_X86_64_DTPOFF64 relocation, which is supported, and everything works fine.

Note: See TracTickets for help on using tickets.