libtool
[Top][All Lists]
Advanced

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

libtool and DTrace link steps


From: Andreas Färber
Subject: libtool and DTrace link steps
Date: Fri, 6 Jun 2008 23:31:52 +0200

Hello,

I've recently added DTrace USDT probes to a project using libtool. On Solaris, this requires running dtrace with all affected object files as arguments. The tool modifies those object files and generates a new object file, which must all be linked into the executable/library. This step cannot be done incrementally, it must be repeated for each executable/library on all the original object files.

The solution I have come up with is to use
lib_la_LIBADD=generated.o
together with a rule
generated.o: ../dir1/lib1.la ../dir2/lib2.la obj1.lo
calling a custom shell script with these arguments that extracts the .libs/*.a library corresponding to the .la to a temporary directory, overwrites the .o files with a guess of their originals, runs dtrace -G over these temporary object files and updates the .a files with the modified files.

As you may guess, libtool doesn't like being passed a .o file, and my heuristics for retrieving the locations of .a and .o files aren't entirely safe.

Seeing that libtool itself appears to do something similar by extracting its .a libraries to .lax folders before linking iiuc, wouldn't it make sense to rather extend libtool with DTrace support? Has anybody already looked into this, or do you have any suggestions how to go about that?

Thanks,
Andreas





reply via email to

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