This is the mail archive of the libc-alpha@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]

Re: [PATCH 06/19] Define IN_MODULE for translation units that define NOT_IN_libc


On 6 September 2014 00:24, Roland McGrath <roland@hack.frob.com> wrote:
> I can't tell if you're saying this is an actual problem.  I don't see why
> symbol-hacks.h would be a problem for interp.c.

It is an actual problem.  If interp.c is built with IS_IN(libc) (or
without NOT_IN_libc in the older scheme), symbol-hacks.h injects this
code:

asm ("memmove = __GI_memmove");
asm ("memset = __GI_memset");
asm ("memcpy = __GI_memcpy");

This results in interp.os having undefined references to the __GI_mem*
functions above:

0000000000000000         *UND*  0000000000000000 __GI_memmove
0000000000000000         *UND*  0000000000000000 __GI_memset
0000000000000000         *UND*  0000000000000000 __GI_memcpy

Those symbols are not exported outside libc.so, thus resulting in a
linker error in every DSO we build, except libc.so.

Maybe the assembler should not be adding these references to the
symbol table since they're only useful if memset, memmove or memcpy
are called, but either way we'll need to work around it in libc.

Siddhesh
-- 
http://siddhesh.in


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