This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Optimize ld.so for copy relocation
- From: "H. J. Lu" <hjl at lucon dot org>
- To: GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Wed, 26 Mar 2003 16:38:13 -0800
- Subject: Optimize ld.so for copy relocation
In do-lookup.h, there are
/* Don't search the executable when resolving a copy reloc. */
if ((type_class & ELF_RTYPE_CLASS_COPY) && map->l_type == lt_executable)
continue;
On some arches, like ia64, there is no ELF_RTYPE_CLASS_COPY relocation.
If we can add
#define ELF_RTYPE_CLASS_COPY 0
for those arches, gcc can optimize the code above out. We can add
#undef ELF_RTYPE_CLASS_COPY
#define ELF_RTYPE_CLASS_COPY 0
in either ia64's ld-machine.h or ldsodefs.h. Any comments?
H.J.