nommu handling of DT_TEXTREL

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Apr 5 21:03:43 UTC 2011


On Fri, Apr 01, 2011 at 03:06:55PM +0200, Bernd Schmidt wrote:

>Index: ldso/ldso/dl-elf.c
>===================================================================
>--- ldso/ldso/dl-elf.c	(revision 319237)
>+++ ldso/ldso/dl-elf.c	(working copy)

>+static void *
>+map_writeable (int infile, ElfW(Phdr) *ppnt, int piclib, int flags,
>+	       unsigned long libaddr)
>+{

>+	char *piclib2map = 0;

= NULL

>+#ifndef MIN
>+# define MIN(a,b) ((a) < (b) ? (a) : (b))

MIN is always defined via sys/param.h

>@@ -475,6 +593,7 @@ struct elf_resolve *_dl_load_elf_shared_
> 		status = (char *) _dl_mmap((char *) (piclib ? 0 : minvma),
> 				maxvma - minvma, PROT_NONE, flags | MAP_ANONYMOUS, -1, 0);
> 		if (_dl_mmap_check_error(status)) {
>+		cant_map:

Please use uppercase labels (also for cant_map1 et al)

>Index: ldso/ldso/frv/dl-inlines.h
>===================================================================
>--- ldso/ldso/frv/dl-inlines.h	(revision 319234)
>+++ ldso/ldso/frv/dl-inlines.h	(working copy)
>@@ -83,6 +83,39 @@ __dl_init_loadaddr_hdr (struct elf32_fdp
> #endif
> }
> 
>+/* Replace an existing entry in the load map.  */
>+static __always_inline void
>+__dl_update_loadaddr_hdr (struct elf32_fdpic_loadaddr loadaddr, void *addr,
>+			  Elf32_Phdr *phdr)
>+{

>+#if defined (__SUPPORT_LD_DEBUG__)
>+  {
>+    extern char *_dl_debug;
>+    extern int _dl_debug_file;

Why are these 2 externs needed?



More information about the uClibc mailing list