[SDL] Oops ! Really big problem with hermes sublibrary of SDL under QNX6
Mike Gorchak
lestat at i.com.ua
Sun Apr 4 22:40:42 PDT 2004
Hello, All!
Got a big problem yesterday, trying to enable MMX accelerated code under
QNX6. Hermes library isn't a valid PIC code, so it's usage in shared library
objects can cause continuous segmentation faults in different places
(including at initialization stage). Of course it depends on OS
architecture.
For example file mmxp2_32.asm: it contains the following line:
movq mm6, qword [mmx32_rgb888_mask]
which is wrong. According to NASM manual (check this section:
http://ivs.cs.uni-magdeburg.de/bs/lehre/sose99/bs1/nasm/nasmdoc8.html#section-8.2)
it must be:
....
call .get_GOT
.get_GOT: pop ebx
add ebx,_GLOBAL_OFFSET_TABLE_+$$-.get_GOT wrt ..gotpc
....
otherwise it will fail ! QNX6 is very sensetive to this problems with PIC
code. One mistake and you'll get SEGFAULT. Only static library works.
Maybe better to rewrite all this code via 'asm' includes in C modules ? Any
suggestions ?
Thanks !
With best regards, Mike Gorchak. E-mail: lestat at i.com.ua
More information about the SDL
mailing list