[PATCH] elf/dl-load.c: Remove local_strdup.

Carlos O'Donell carlos@redhat.com
Fri Oct 24 20:34:00 GMT 2014


On 10/24/2014 01:01 PM, Roland McGrath wrote:
> Please use __strdup explicitly rather than relying on some magic rewriting.

Just to be clear, the reason, from first principles, that we want
to use __strdup is that we want to make sure this symbol is never
interposed by the user (correctness) and never goes through the PLT
(perfromance)? I get that relying on string/string2.h alias to do
this for me is not the best idea.

I see that __strsep in dl-load.c is called with double underscore,
but why not strlen? Is it because for these routines, which are
always in ld.so, we rely on the ld.so copies of them?

I also thought for a second that a strcpy that went into the PLT
would trigger check-localplt failures, but then I saw ld.so is not
part of that test? Any reason why not?

Cheers,
Carlos.
 



More information about the Libc-alpha mailing list