This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: linking possibilities


> Date: Fri, 08 Jun 2001 18:00:36 +0200
> From: Rafael =?iso-8859-1?Q?Rodr=EDguez?= Velilla <rrv@tid.es>
> To: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>

> What I would want to do is to download the threads individually, not
> the whole operating system.

> Can I compile somehow an application using the information of the
> locations of the routines of another one (not an obect file but an
> executable)?

Yes, I believe you can, see the ld documentation.  This is a binutils
(ld) question by the way, doesn't have much to do with gcc.

.TP
.BI "\-R " "filename"
Read symbol names and their addresses from \c
.I filename\c
\&, but do not
relocate it or include it in the output.  This allows your output file
to refer symbolically to absolute locations of memory defined in other
programs.

> Is there a way to include in an executable all the functions of a
> library even if they are not referenced in the application (in order
> to have them in case any of the new downloaded threads needs them)?

Again, this is a binutils (ld) question, I am not sure.  The option
--whole-archive looks promising.

.TP
.B \-\-whole\-archive
For each archive mentioned on the command line after the
.B \-\-whole\-archive
option, include every object file in the archive in the link, rather
than searching the archive for the required object files.  This is
normally used to turn an archive file into a shared library, forcing
every object to be included in the resulting shared library.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]