1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
Index: uClibc-0.9.28.2/ldso/ldso/dl-hash.c
===================================================================
--- uClibc-0.9.28.2.orig/ldso/ldso/dl-hash.c 2007-11-09 03:35:13.193591913 +0100
+++ uClibc-0.9.28.2/ldso/ldso/dl-hash.c 2007-11-09 03:52:41.713343652 +0100
@@ -124,6 +124,15 @@
return tpnt;
}
+void (*__uClibc_main)(void *main, int argc, char **argv, void (*app_init)(void), void (*app_fini)(void), void *, void *) = NULL;
+int (*main)(int argc, char **argv, char **envp) = NULL;
+void
+__uClibc_start_main(int argc, char **argv, char **envp,
+ void (*app_fini)(void), void (*app_init)(void))
+{
+ __uClibc_main(main, argc, argv, app_init, app_fini, NULL, NULL);
+}
+
/*
* This function resolves externals, and this is either called when we process
@@ -139,6 +148,12 @@
const ElfW(Sym) *sym;
char *weak_result = NULL;
+ if (_dl_strcmp(name, "__uClibc_start_main") == 0) {
+ main = _dl_find_hash("main", rpnt, mytpnt, type_class);
+ __uClibc_main = _dl_find_hash("__uClibc_main", rpnt, mytpnt, type_class);
+ return (char *) &__uClibc_start_main;
+ }
+
elf_hash_number = _dl_elf_hash(name);
for (; rpnt; rpnt = rpnt->next) {
Index: uClibc-0.9.28.2/Makefile
===================================================================
--- uClibc-0.9.28.2.orig/Makefile 2007-11-09 03:54:20.814991133 +0100
+++ uClibc-0.9.28.2/Makefile 2007-11-09 03:58:56.346692786 +0100
@@ -28,10 +28,7 @@
TOPDIR=./
include Rules.mak
-DIRS = ldso libc libcrypt libresolv libnsl libutil libm libpthread librt
-ifeq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
- DIRS += libintl
-endif
+DIRS = ldso
ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
@@ -47,16 +44,6 @@
$(SECHO)
@$(MAKE) -C libc shared
@$(MAKE) -C ldso shared
- @$(MAKE) -C libcrypt shared
- @$(MAKE) -C libresolv shared
- @$(MAKE) -C libnsl shared
- @$(MAKE) -C libutil shared
- @$(MAKE) -C libm shared
- @$(MAKE) -C libpthread shared
- @$(MAKE) -C librt shared
-ifeq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
- @$(MAKE) -C libintl shared
-endif
else
$(SECHO)
$(SECHO) Not building shared libraries ...
|