Thanks!!

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Adam Jackson
Sent: Friday, September 18, 2009 11:08 AM
To: Development discussions related to Fedora
Subject: Re: GNU libc confusion with symbols undefined.

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

They're "undefined" in your binary because your binary does not define them.  
It references them, and some other library you're linked against provides them.

- ajax

-- 
fedora-devel-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Reply via email to