How make a type specific LIB and ELF
Hi
Can someone help please. How can I build a LIB & ELF that only possible to compile and run on one kind of Linux distribution? Is it possible to create a type-specific ELF & LIB? Thanks |
It sounds like you are trying to compile something into a binary of a specific architecture, it, a 32bit binary, or a 64bit binary. Is that what you are trying to do?
If so, you need to have the libraries and header files installed *for that architecture*. So if your system is 64bit and you are trying to compile something for 32xit, then you need the libs and headers for 32bit; just because you have the 64bit versions on your system does not mean the 32bit versions are also there. So you probably need to install those. After that, it's a simple(-ish) matter of gcc usage. For example: Code:
gcc -m32 infile.c -o outfile -L/usr/lib -march=i586 More details about what your system is, and what your target is, and what you have tried so far would be helpful. |
Script configure might check the distribution (eg via searching for distro-specific files in /etc), if that's what you mean... of course the user will see the script, so they can remove the check. It wouldn't make much sense anyways.
PS: exactly what do you mean under 'kind' and 'type'? |
Quote:
Of course it's not possible. I'm curious as to why you want to do that though. |
All times are GMT -5. The time now is 01:51 PM. |