Re: GNU libc confusion with symbols undefined.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2009-09-18 at 09:21 -0500, Brown, Rodrick wrote:
> I'm trying to understand the following here
> 
> I have a simple test program that calls memcpy/malloc/printf
> 
> int
> main(int argc, char **argv)
> {
>  char * p = malloc(10);
>  memcpy(p,"Hello",6);
>  printf("%s\n", p);
> }
> 
> When looking at the symbol list why are the following routines undefined? And why is it referncing GLIBC_2.2.5?
> 
> $ nm /tmp/f |grep ' U '
>                  U __libc_start_main@@GLIBC_2.2.5
>                  U malloc@@GLIBC_2.2.5
>                  U memcpy@@GLIBC_2.2.5
>                  U printf@@GLIBC_2.2.5
> 
> $ rpm -qa |grep -i glibc
> glibc-2.3.4-2.41
> glibc-common-2.3.4-2.41
> glibc-2.3.4-2.41
> 
> I really can't find an explination for this and was wondering if someone could clear it up.

libc has "versioned symbols", and you're linking against the default
implementations of each of the three symbols, as defined in the version
of libc you built against (the "@@" notation means the default version
of a versioned symbol).

For detailed information on this, see:
http://people.redhat.com/drepper/dsohowto.pdf
and for the most detail, see:
http://people.redhat.com/drepper/symbol-versioning


Hope this helps
Dave

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux