More .so hell
securehell@hushmail.com
securehell@hushmail.com
Fri Feb 10 01:33:00 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey guys,
This might be more appropriate for a GCC list but you've been very
helpful so far, so here goes...
I have a header file that includes the code for a funcion and is
declared __forceinline on a different (Windows) platform. I am
trying to get it to build on Linux and have tried __forceinline,
__inline__, inline, and __attribute__((always_inline)) but gcc
3.4.4 doesn't seem to compile it as the header is called several
times by various .c files.
For example: __attribute__(allways_inline)) gave me this:
file.h:64: sorry, unimplemented: inlining failed in call to
'your_function': function not inlinable
file1.c:35: sorry, unimplemented: called from here
Using "inline" I got this while linking:
gcc -shared -Wl,--whole-archive -fPIC -o liblib.so file.o liba.a
libb.a -Wl,--no-whole-archive
liba.a(file1.o)(.text+0x0): In function `your_function'
: multiple definition of `your_function'
liba.a(file2.o)(.text+0x0): first defined here
liba.a(file3.o)(.text+0x0): In function `your_function':
: multiple definition of `your_function'
liba.a(file2.o)(.text+0x0): first defined here
liba.a(file4.o)(.text+0x0): In function `your_function':
: multiple definition of `your_function'
liba.a(file2.o)(.text+0x0): first defined here
liba.a(file5.o)(.text+0x0): In function `your_function':
: multiple definition of `your_function'
liba.a(file2.o)(.text+0x0): first defined here
liba.a(feil6.o)(.text+0x0): In function `your_function':
: multiple definition of `your_function'
liba.a(file2.o)(.text+0x0): first defined here
collect2: ld returned 1 exit status
Any idea how to make the compiler inline this function?
Thanks,
SH
-----BEGIN PGP SIGNATURE-----
Note: This signature can be verified at https://www.hushtools.com/verify
Version: Hush 2.4
wkYEARECAAYFAkPrwqYACgkQRBFe1uc9INq9cQCgrXYq9dmKoH1T2/H0DogMV6GXS6cA
nR10CFyAu4GfzJuON9wppSXIAuKX
=GS35
-----END PGP SIGNATURE-----
More information about the Binutils
mailing list