FD-PIC patches for uClibc

Joakim Tjernlund joakim.tjernlund at transmode.se
Sun Nov 25 14:48:01 UTC 2007


> -----Original Message-----
> From: uclibc-bounces at uclibc.org 
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of Bernd Schmidt
> Sent: den 25 november 2007 15:08
> To: uClibc
> Cc: Alexandre Oliva
> Subject: FD-PIC patches for uClibc
> 
> These are the FD-PIC patches necessary to get ld.so working on the
> Blackfin.  These were originally written by Alex Oliva for the FRV and
> updated to work with current uClibc sources by myself.
> 
> I'm posting these for review; I intend to check them in in a 
> few days if
> there are no objections.
> 
> Note that I can't really test these yet since upstream uClibc isn't
> entirely working yet on the Blackfin, but at least for ld.so it's now
> near-identical to the working code in our repository.
> 
> 
> Bernd

Did a quick scan of the patches and came up with these comments:

The 02_underscores patch is really ugly.

Don't like the dl_find_hash_mod v.s dl_find_hash thingy. Also there are changes
to dl_find_hash needed by NPTL that might conflict with yours.
Carmelo/sjhill should be able to tell you more.

This should be abstracted away:
+#ifdef DL_LOOKUP_ADDRESS
+	__address = DL_LOOKUP_ADDRESS (__address);
+#endif
...
+#if defined(DL_BOOT_COMPUTE_GOT)
+	DL_BOOT_COMPUTE_GOT(got);
+#else
 	got = elf_machine_dynamic();
+#endif
+
+	/* Now, finally, fix up the location of the dynamic stuff */
+#ifdef DL_BOOT_COMPUTE_DYN
+	DL_BOOT_COMPUTE_DYN (dpnt, got, load_addr);
+#else
 	dpnt = (ElfW(Dyn) *) DL_RELOC_ADDR(load_addr, got);
+#endif

similar to DL_GET_READY_TO_RUN_EXTRA_PARMS/DL_GET_READY_TO_RUN_EXTRA_ARGS

Need to run now.

 Jocke





More information about the uClibc mailing list