On Fri, Aug 03, 2018 at 11:23:06AM +0200, Martin Liška wrote: > I created a working prototype and as it's my first time I'm creating a shared > library in GCC, I've got multiple questions: > > 1) currently both libgcov.so and libgcov.a are installed in an install folder > and > when using: gcc main.c -lcov the static one is preferred.
That is really weird, how do you manage to ensure that? The linker should prefer shared libraries over static libraries when not -static... > Do we need an option -static-libgcov? > > 2) I created libgcc/config/t-libgcov-elf file. It's currently added just for: > x86_64-*-linux*) What is x86_64 specific about ? > 3) Should I come up with a symbol versioning of the libgcov API? Certainly. > +# You should have received a copy of the GNU General Public License > +# along with GCC; see the file COPYING3. If not see > +# <http://www.gnu.org/licenses/>. > + > +# Build libunwind for ELF with the GNU linker. libunwind? Jakub