[arch-general] gcc version package is compiled with
Gerardo Exequiel Pozzi
vmlinuz386 at yahoo.com.ar
Tue Jun 16 20:07:47 EDT 2009
Jan de Groot wrote:
> On Tue, 2009-06-16 at 20:09 -0300, Gerardo Exequiel Pozzi wrote:
>
>> Baho Utot wrote:
>>
>>> Is there any way to tell which version of gcc an executable is
>>> compiled with?
>>>
>>>
>>>
>>>
>> Hello :)
>>
>> Maybe can be a better way :) But this just works.
>>
>> strings -a /the/file | grep -m1 GCC
>>
>> Good Luck!
>>
>
> Seems to work, but only on binaries and libraries that have been
> compiled against glibc. Libraries compiled against uclibc won't show
> this information.
>
>
>
Rare, this is not related to what "libc" used, is just an assembler
label (.ident) that GCC put in the output .s file.
What are the commands that you use to build the library? Compiling an
executable/library with toolchain-ulibc works fine here.
$ x86_64-unknown-linux-uclibc-gcc -fPIC -c hola.c
$ x86_64-unknown-linux-uclibc-gcc -shared -o hola.so hola.o
$ strings -a hola.so | grep -m1 GCC:
GCC: (GNU) 4.4.0 20090526 (prerelease)
$ readelf -d hola.so | grep NEEDED
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.0]
--
Gerardo Exequiel Pozzi ( djgera )
http://www.djgera.com.ar
KeyID: 0x1B8C330D
Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D
More information about the arch-general
mailing list