[Top][All Lists]

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

Re: partial linking

From: Ralf Wildenhues
Subject: Re: partial linking
Date: Thu, 13 Jan 2005 18:41:50 +0100
User-agent: Mutt/1.4.1i

[ reply to two bug reports ]

Hi Andreas and Пухальский,

I hope that is the right way to address you (this is the first time I
use cut'n'paste with UTF-8 proper, plus I can barely decipher cyrillic).

* Пухальский Юрий Андреевич wrote on Thu, Jan 13, 2005 at 01:48:06PM CET:
> Am I right, that there is no way to pass additional linker flags when
> doing partial linking?

Yes, as of now.  Consider it a bug.

> I try
> ./libtool --mode=link g++ -Xlinker -<flag> -o a.o b.o
> And anyway it produces
> ld -r -o a.o b.o
> Btw, it doesn't show "-Xlinker", "-XCClinker" and "-Wl," options in
> help screen when invoking
> libtool --help --mode=link

Another bug.

* Andreas Fenkart wrote on Sun, Jan 09, 2005 at 01:36:39AM CET:
> I have a question regarding partial linking. I found a thread earlier on
> this list, namely here.
> Unfortunately there was no answer on doing partial linking the right way.
> The answer given suggests adding dummy functions and reference them from
> elsewhere in the code. That's exactly what I try to avoid.
> This is what I do
> $(LIBTOOL) --mode=link g++ -o $(OBJDIR)/intermediate.lo/\
>          $(OBJS:.o=.lo)
> $(LIBTOOL) --mode=link g++ -o $(LIBDIR)/$(LA_LIBFILENAME) \
>          -rpath $(INSTALLLIB_DIR) \
>          $(OBJDIR)/intermediate.lo
> Unfortunately this fails, because the intermediate.lo is not a textfile
> describing where the PIC object is found, but the PIC object itself. No
> object is placed into the .libs directory, which libtool usually does when
> building *.lo files.

Another bug in libtool.

> I read the code(libtool-1.5.10) and I'm willing to add the necessary bits to
> create a proper .lo file. (Basically just copy-paste from the compile-case).
> I'm just asking myself if the current behavior is on purpose, or an
> oversight.
> Anybody out here who can tell me how partial linking was thought to be used
> in the first place.

If you ask me, intermediate.lo file should be a text file, and
intermediate.o and $objdir/intermediate.o the two partially linked

If you have time: Patches to all these bugs are very welcome.  If you
decide to patch against branch-1-5, however, I would very much like to
also see a forward port to branch-2-0/HEAD (the latter two are very


reply via email to

[Prev in Thread] Current Thread [Next in Thread]