Optimize ld.so for copy relocation

H. J. Lu hjl@lucon.org
Thu Mar 27 00:38:00 GMT 2003


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.



More information about the Libc-alpha mailing list