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]

Multiple definition of __memcpy_chk


Hello, I am experiencing a new problem, and I am not sure if it's a problem with gcc or glibc or with something that I am doing.

The problem is that when I compile glibc, it defines a symbol called __memcpy_chk.

Then when I go to compile gcc, it tries to compile and link libssp, and that also defines its own __memcpy_chk.

Keep in mind that I have compiled libc as a purely static library; there is no libc.so being linked against.

In evaluating this problem, I find in libc-symbols.h that "libc_hidden_proto" is defined as "hidden_proto" and that this does nothing if SHARED is not defined. I interpret this as meaning that there is no way to hide symbols when compiling static libraries. Is this true? Does the visibility attribute only work for shared libraries?

In any case, how can glibc export these internal __ symbols, such as __memcpy_chk, in its static library version? That means that glibc is polluting the symbol space with internal stuff that libraries/executables linking against glibc will have to work around. In this case, libssp of gcc wants to use the same symbol.

Is there a way when compiling glibc as a static library to hide the __memcpy_chk symbol?

Thanks!
Bryan


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