Re: About gcc

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

 



Hello Rene !

  Thank you for the information given by
you . It would be more helpful if you 
could let me know if there is some document 
which helps me interpret & understand the
" spec " file and tells how it is used 
by gcc .

   Thank you very much .

Cheers !


 --- Rene Herman <rene.herman@keyaccess.nl> wrote: >
Anticipating a Reply wrote:
> 
> >    In the man page of "dlopen" ,
> > I came across the gcc compilation
> > command :-
> > 
> >   gcc -rdynamic -o foo foo.c -ldl
> > 
> > But unfortunately  , I found that
> > the options are undocumented .i.e.
> > " -rdynamic " & " -ldl " could not
> > be traced  in info & man gcc.
> 
> As to -rdynamic:
> 
> GCC does quite a lot of option
> translation/substitution using its 
> "spec" file. If you type "gcc -v", you will see
> something like:
> 
> Reading specs from
> /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
> 
> That file is a regular ASCII file that you can open
> with any viewer 
> Alternatively, you can have GCC dump the spec file
> at you itself using 
> "gcc -dumpspecs". The format isn't *too* cryptic.
> When you search for 
> -rdynamic in those specs, you will see that GCC
> translates that option 
> into the "-export-dynamic" option to the linker.
> "man ld" will now give 
> you all the info.
> 
> As to -ldl:
> 
> That "option" most certainly *is* documented in "man
> gcc"
> 
> ===
> -llibrary
> -l library
>    Search the library named library when linking.
> (The second
>    alternative with the library as a separate
> argument is only
>    for POSIX compliance and is not recommended.)
> ===
> 
> That is, you are requesting that gcc link in the
> "dl" library 
> (/lib/libdl.so.2). "man dlopen" for the
> documentation on the functions 
> in that library.
> 
> Rene.
> 
> --
> Kernelnewbies: Help each other learn about the Linux
> kernel.
> Archive:      
> http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 

________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
       visit http://in.tv.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux