On Fri, Dec 23, 2016 at 06:43:42PM +0100, Mark Kettenis wrote: > > Date: Fri, 23 Dec 2016 18:13:45 +0100 > > From: Joerg Sonnenberger <jo...@bec.de> > > > > On Thu, Dec 22, 2016 at 10:35:25PM -0800, Philip Guenther wrote: > > > I'm assuming clang handles asm names like gcc, such that declaring > > > void *memcpy(void *__restrict, const void *__restrict, __size_t) > > > __dso_hidden __asm("_dl_memcpy"); > > > > > > will make even internally generated calls go to _dl_memcpy instead. > > > > No. The backend normally has no idea about assembler names. What problem > > are you trying to solve, really? > > Right. The solution gere is probably to rename _dl_memcpy back to > memcpy. One of the reasons why _dl_memcpy exists is that we wanted to > prevent exporting ld.so's memcpy implementation such that nothing else > would accidentally pick it up. But now that we explicitly control > which symbols we export from ld.so, that risk doesn't exist anymore.
Correct. x86 is more forgiving here than others as it doesn't tend to pull in anything from libgcc/compiler-rt/whatever, but the same issue will exist e.g. for the division helper if you care about armv6 etc. Joerg