[PATCH 06/19] Define IN_MODULE for translation units that define NOT_IN_libc
Siddhesh Poyarekar
siddhesh.poyarekar@gmail.com
Fri Sep 5 22:50:00 GMT 2014
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
More information about the Libc-alpha
mailing list