This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Adding a new function to memcpy.c


Hi,

I am trying to create a new library function which I want to call memcpy_TC. I want memcpy_TC to be an exact clone of memcpy. I made the corresponding modifications to string/memcpy.c, string/string.h and include/string.h to include my new function. I also removed sysdeps/.../memcpy.S. However, after 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 during the linking of libc.so? Am I missing something here?

Thank you,

Rodrigo



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]