[uClibc][PATCH] Add more relocs to SH ldso

M. R. Brown mrbrown at 0xd6.org
Thu Oct 31 11:32:36 UTC 2002


* Stefan Allius <allius at atecom.com> on Thu, Oct 31, 2002:

> --- /home/allius/uClibc/ldso/ldso/sh/elfinterp.c	Tue Oct  1 08:10:38 2002
> +++ /home/allius/dev/avmux/linux/uClibc/ldso/ldso/sh/elfinterp.c	Wed Oct 30 10:20:31 2002
> @@ -290,6 +290,7 @@
>  		case R_SH_DIR32:
>  			*reloc_addr = symbol_addr + rpnt->r_addend;
>  			break;
> +		case R_SH_GLOB_DAT:
>  		case R_SH_JMP_SLOT:
>  			*reloc_addr = symbol_addr + rpnt->r_addend;
>  			break;

Yes, I suppose this optimization can be made in the bootstrap loader as well
for R_SH_DIR32, R_SH_GLOB_DAT, and R_SH_JMP_SLOT.  Erik, could you use the
above for those cases instead of my patch?

> --- /home/allius/uClibc/ldso/ldso/sh/resolve.S	Tue Oct  1 08:10:38 2002
> +++ /home/allius/dev/avmux/linux/uClibc/ldso/ldso/sh/resolve.S	Wed Oct 30 15:04:01 2002
> @@ -1,3 +1,6 @@
> +#define __need_uClibc_config_h 1
> +#include <bits/uClibc_config.h>
> +
>  /*
>   * Stolen from glibc-2.2.2 by Eddie C. Dost <ecd at atecom.com>
>   */
> @@ -79,6 +82,10 @@
>  
>  	.balign	4
>  3:
> +#ifdef HAVE_SHARED
> +	.long   _dl_linux_resolver at PLT-(.jmp_loc-(.))
> +#else
>  	.long   _dl_linux_resolver - .jmp_loc
> +#endif		
>  	.size	_dl_linux_resolve, . - _dl_linux_resolve

I don't understand.  Won't HAVE_SHARED always be true when building ldso?

M. R.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20021031/85087e62/attachment.pgp 


More information about the uClibc mailing list