[csw-maintainers] assembler in shared libraries

Mike Watters mwatters at opencsw.org
Mon Jun 1 17:51:55 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter FELECAN wrote:
> Trying to package/port projects using optimizations implemented in
> assembler I encounter the same issue for which I didn't found a solution.
> 
> For the moment, the issue manifests itself only on i386 architecture as
> the porting has as source, projects developed on Linux and concerns
> mainly video applications, e.g., ffmpeg, xvid, &c.
> 
> In the linking phase of the share library I get the following message:
> 
> Text relocation remains                 	referenced
>     against symbol		    offset	in file
> <unknown>                   0x7   	bitstream/x86_asm/cbp_mmx.o
> .
> .
> .
> <unknown>                   0xc6   	utils/x86_asm/cpuid.o
> ld: fatal: relocations remain against allocatable but non-writable sections
> collect2: ld returned 1 exit status
> 
> The result of my research can be summarized as follows: don't
> use hand written assembly in shared libraries if you're not using the
> GNU linker.
> 
> The consequences of this are:
> 
> - don't activate assembler optimizations: poor performance
> - where the previous is not possible, don't generate shared
>   libraries containing the assembler code: build only statically linked
>   binaries --- at least the corresponding library is statically linked
> 
> Is there a fellow maintainer having a positive experience on building
> shared libraries for Solaris containing assembler code and willing to
> share his solution?
> 

The solution I used was to use gnu linker.



- --

Thanks,
Mike

"Any intelligent fool can make things bigger, more complex,
and more violent.  It takes a touch of genius -- and a lot of courage --
to move in the opposite direction."

* Albert Einstein 1879 - 1955
    US German-born Theoretical Physicist
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (SunOS)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoj+RsACgkQLrhmsXMSLxcL8wCggoidR+PkaZpTmwwLADpfWA59
OqkAoJRJiNVJjHkYG9PPBZ2bksBhRihv
=etrg
-----END PGP SIGNATURE-----



More information about the maintainers mailing list