svn commit: trunk/uClibc/ldso/ldso: arm avr32 bfin cris frv i386 m68k mips etc...
vda at uclibc.org
vda at uclibc.org
Sun Jan 4 21:19:43 UTC 2009
Author: vda
Date: 2009-01-04 21:19:43 +0000 (Sun, 04 Jan 2009)
New Revision: 24686
Log:
ldso/ldso/dl-startup.c: make _dl_elf_main static; remove one dead variable.
ldso/ldso/avr32/dl-startup.h: remove superfluous definition of START() macro.
ldso/ldso/*/dl-startup.h: fix a typo in comment
text data bss dec hex filename
- 16752 244 92 17088 42c0 lib/ld-uClibc.so
+ 16709 240 92 17041 4291 lib/ld-uClibc.so
Modified:
trunk/uClibc/ldso/ldso/arm/dl-startup.h
trunk/uClibc/ldso/ldso/avr32/dl-startup.h
trunk/uClibc/ldso/ldso/bfin/dl-startup.h
trunk/uClibc/ldso/ldso/cris/dl-startup.h
trunk/uClibc/ldso/ldso/dl-startup.c
trunk/uClibc/ldso/ldso/frv/dl-startup.h
trunk/uClibc/ldso/ldso/i386/dl-startup.h
trunk/uClibc/ldso/ldso/m68k/dl-startup.h
trunk/uClibc/ldso/ldso/mips/dl-startup.h
trunk/uClibc/ldso/ldso/powerpc/dl-startup.h
trunk/uClibc/ldso/ldso/sh/dl-startup.h
trunk/uClibc/ldso/ldso/sh64/dl-startup.h
trunk/uClibc/ldso/ldso/sparc/dl-startup.h
trunk/uClibc/ldso/ldso/x86_64/dl-startup.h
Changeset:
Modified: trunk/uClibc/ldso/ldso/arm/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/arm/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/arm/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -131,7 +131,7 @@
/* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here. */
#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long*)ARGS)+1)
Modified: trunk/uClibc/ldso/ldso/avr32/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/avr32/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/avr32/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -41,7 +41,7 @@
" .previous\n");
/* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here. */
#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long *)ARGS + 1)
@@ -101,12 +101,3 @@
_dl_exit(1);
}
}
-
-/* Transfer control to the user's application, once the dynamic loader
- * is done. This routine has to exit the current function, then call
- * the _dl_elf_main function.
- *
- * Since our _dl_boot will simply call whatever is returned by
- * _dl_boot2, we can just return the address we're supposed to
- * call. */
-#define START() return _dl_elf_main;
Modified: trunk/uClibc/ldso/ldso/bfin/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/bfin/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/bfin/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -100,7 +100,7 @@
/*
* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here.
*/
#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long*) ARGS) + 1)
Modified: trunk/uClibc/ldso/ldso/cris/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/cris/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/cris/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -43,7 +43,7 @@
#endif /* __arch_v32 */
/* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here. */
#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long *) ARGS)+1)
Modified: trunk/uClibc/ldso/ldso/dl-startup.c
===================================================================
--- trunk/uClibc/ldso/ldso/dl-startup.c 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/dl-startup.c 2009-01-04 21:19:43 UTC (rev 24686)
@@ -95,7 +95,7 @@
#include "dl-startup.h"
/* Static declarations */
-int (*_dl_elf_main) (int, char **, char **);
+static int (*_dl_elf_main) (int, char **, char **);
static void* __rtld_stack_end; /* Points to argc on stack, e.g *((long *)__rtld_stackend) == argc */
strong_alias(__rtld_stack_end, __libc_stack_end) /* Exported version of __rtld_stack_end */
@@ -103,8 +103,7 @@
/* When we enter this piece of code, the program stack looks like this:
argc argument counter (integer)
argv[0] program name (pointer)
- argv[1...N] program args (pointers)
- argv[argc-1] end of args (integer)
+ argv[1..argc-1] program args (pointers)
NULL
env[0...N] environment variables (pointers)
NULL
@@ -123,7 +122,7 @@
ElfW(auxv_t) auxvt[AT_EGID + 1];
ElfW(Dyn) *dpnt;
- /* WARNING! -- we cannot make _any_ funtion calls until we have
+ /* WARNING! -- we cannot make _any_ function calls until we have
* taken care of fixing up our own relocations. Making static
* inline calls is ok, but _no_ function calls. Not yet
* anyways. */
@@ -131,12 +130,12 @@
/* First obtain the information on the stack that tells us more about
what binary is loaded, where it is loaded, etc, etc */
GET_ARGV(aux_dat, args);
- argc = *(aux_dat - 1);
+ argc = aux_dat[-1];
argv = (char **) aux_dat;
aux_dat += argc; /* Skip over the argv pointers */
aux_dat++; /* Skip over NULL at end of argv */
envp = (char **) aux_dat;
-#ifndef NO_EARLY_SEND_STDERR
+#if !defined(NO_EARLY_SEND_STDERR)
SEND_EARLY_STDERR_DEBUG("argc=");
SEND_NUMBER_STDERR_DEBUG(argc, 0);
SEND_EARLY_STDERR_DEBUG(" argv=");
@@ -195,7 +194,7 @@
DL_BOOT_COMPUTE_GOT(got);
/* Now, finally, fix up the location of the dynamic stuff */
- DL_BOOT_COMPUTE_DYN (dpnt, got, load_addr);
+ DL_BOOT_COMPUTE_DYN(dpnt, got, load_addr);
SEND_EARLY_STDERR_DEBUG("First Dynamic section entry=");
SEND_ADDRESS_STDERR_DEBUG(dpnt, 1);
@@ -215,11 +214,9 @@
SEND_EARLY_STDERR_DEBUG("Done scanning DYNAMIC section\n");
#if defined(PERFORM_BOOTSTRAP_GOT)
-
SEND_EARLY_STDERR_DEBUG("About to do specific GOT bootstrap\n");
/* some arches (like MIPS) we have to tweak the GOT before relocations */
PERFORM_BOOTSTRAP_GOT(tpnt);
-
#endif
#if !defined(PERFORM_BOOTSTRAP_GOT) || defined(__avr32__)
@@ -229,13 +226,12 @@
SEND_EARLY_STDERR_DEBUG("About to do library loader relocations\n");
{
- int goof, indx;
-#ifdef ELF_MACHINE_PLTREL_OVERLAP
+ int indx;
+#if defined(ELF_MACHINE_PLTREL_OVERLAP)
# define INDX_MAX 1
#else
# define INDX_MAX 2
#endif
- goof = 0;
for (indx = 0; indx < INDX_MAX; indx++) {
unsigned int i;
unsigned long *reloc_addr;
@@ -278,8 +274,7 @@
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
sym = &symtab[symtab_index];
symbol_addr = (unsigned long) DL_RELOC_ADDR(load_addr, sym->st_value);
-
-#ifndef EARLY_STDERR_SPECIAL
+#if !defined(EARLY_STDERR_SPECIAL)
SEND_STDERR_DEBUG("relocating symbol: ");
SEND_STDERR_DEBUG(strtab + sym->st_name);
SEND_STDERR_DEBUG("\n");
@@ -291,14 +286,9 @@
PERFORM_BOOTSTRAP_RELOC(rpnt, reloc_addr, symbol_addr, load_addr, sym);
}
}
-
- if (goof) {
- _dl_exit(14);
- }
}
#endif
- /* Wahoo!!! */
SEND_STDERR_DEBUG("Done relocating ldso; we can now use globals and make function calls!\n");
/* Now we have done the mandatory linking of some things. We are now
@@ -311,13 +301,12 @@
_dl_get_ready_to_run(tpnt, load_addr, auxvt, envp, argv
DL_GET_READY_TO_RUN_EXTRA_ARGS);
-
/* Transfer control to the application. */
SEND_STDERR_DEBUG("transfering control to application @ ");
_dl_elf_main = (int (*)(int, char **, char **)) auxvt[AT_ENTRY].a_un.a_val;
SEND_ADDRESS_STDERR_DEBUG(_dl_elf_main, 1);
-#ifndef START
+#if !defined(START)
return _dl_elf_main;
#else
START();
Modified: trunk/uClibc/ldso/ldso/frv/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/frv/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/frv/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -76,7 +76,7 @@
/*
* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here.
*/
#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long*) ARGS)
Modified: trunk/uClibc/ldso/ldso/i386/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/i386/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/i386/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -35,7 +35,7 @@
);
/* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here. */
#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long*) & ARGS)+1)
Modified: trunk/uClibc/ldso/ldso/m68k/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/m68k/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/m68k/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -40,7 +40,7 @@
.previous");
/* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here. */
#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long *) ARGS) + 1)
Modified: trunk/uClibc/ldso/ldso/mips/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/mips/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/mips/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -111,7 +111,7 @@
/*
* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here.
*/
#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long *) ARGS)+1)
Modified: trunk/uClibc/ldso/ldso/powerpc/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/powerpc/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/powerpc/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -60,7 +60,7 @@
/*
* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here.
*/
#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long*) ARGS)+1)
Modified: trunk/uClibc/ldso/ldso/sh/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/sh/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/sh/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -32,7 +32,7 @@
/*
* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here.
*/
#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long*) ARGS)
Modified: trunk/uClibc/ldso/ldso/sh64/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/sh64/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/sh64/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -32,7 +32,7 @@
/*
* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here.
*/
#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long *)ARGS)+1)
Modified: trunk/uClibc/ldso/ldso/sparc/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/sparc/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/sparc/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -47,7 +47,7 @@
/*
* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here. We assume that argc is stored
* at the word just below the argvp that we return here.
*/
Modified: trunk/uClibc/ldso/ldso/x86_64/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/x86_64/dl-startup.h 2009-01-04 21:13:38 UTC (rev 24685)
+++ trunk/uClibc/ldso/ldso/x86_64/dl-startup.h 2009-01-04 21:19:43 UTC (rev 24686)
@@ -35,7 +35,7 @@
);
/* Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
+ * the address of the first argument, on other platforms we need to
* do something a little more subtle here. */
#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long*) ARGS)+1)
More information about the uClibc-cvs
mailing list