This is the mail archive of the
mailing list for the glibc project.
Re: Adding a new function to memcpy.c
- From: "Rodrigo Dominguez" <roddomi at hotmail dot com>
- To: ryan dot arnold at gmail dot com
- Cc: libc-help at sourceware dot org
- Date: Thu, 07 Aug 2008 20:39:37 -0400
- Subject: Re: Adding a new function to memcpy.c
Thanks. That worked. What is this file string/Versions? Can you tell me more
about these files?
From: "Ryan Arnold" <email@example.com>
To: "Rodrigo Dominguez" <firstname.lastname@example.org>
Subject: Re: Adding a new function to memcpy.c
Date: Thu, 7 Aug 2008 15:05:12 -0500
On Thu, Aug 7, 2008 at 2:40 PM, Rodrigo Dominguez <email@example.com>
> I am trying to create a new library function which I want to call
> I want memcpy_TC to be an exact clone of memcpy. I made the
> modifications to string/memcpy.c, string/string.h and include/string.h
> include my new function. I also removed sysdeps/.../memcpy.S. However,
> I build, memcpy_TC is defined as a local symbol in libc.so:
> $nm ../glibc-obj/libc.so | grep memcpy
> 0006ebc0 t __GI_memcpy
> 0006ec10 t __GI_memcpy_TC
> 0006ebc0 T memcpy
> 0006ec10 t memcpy_TC
> I tracked back the build process and I found that libc.so is built from
> libc_pic.os. What I find very strange is that memcpy_TC is defined as a
> global symbol in libc_pic.os. How can it change from global to local
> the linking of libc.so? Am I missing something here?
You need to export it in the string/Versions file.