This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questions related to creation of libgcov.so
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: GCC Development <gcc at gcc dot gnu dot org>, Nathan Sidwell <nathan at acm dot org>, Alexander Monakov <amonakov at ispras dot ru>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 3 Aug 2018 11:30:50 +0200
- Subject: Re: Questions related to creation of libgcov.so
- References: <2bf09eba-a704-8d10-0dd7-9900e275656a@suse.cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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