init: cannot load libc.so.0, kernel panic:trying to kill init
Mahanteshwari Hiremath
Mahanteshwari.Hiremath at lnties.com
Mon Oct 24 05:51:12 UTC 2011
Yes,
here is the output of
>./i586-linux-gcc -o hello test.c -static
> readelf -a hello
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Intel 80386
Version: 0x1
Entry point address: 0x80480d0
Start of program headers: 52 (bytes into file)
Start of section headers: 9576 (bytes into file)
Flags: 0x0
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 4
Size of section headers: 40 (bytes)
Number of section headers: 23
Section header string table index: 20
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .init PROGBITS 080480b4 0000b4 00001c 00 AX 0 0 1
[ 2] .text PROGBITS 080480d0 0000d0 0019c0 00 AX 0 0 16
[ 3] .fini PROGBITS 08049a90 001a90 000017 00 AX 0 0 1
[ 4] .rodata PROGBITS 08049aa8 001aa8 000087 00 A 0 0 4
[ 5] .eh_frame PROGBITS 08049b30 001b30 000220 00 A 0 0 4
[ 6] .tbss NOBITS 0804a000 002000 000008 00 WAT 0 0 4
[ 7] .ctors PROGBITS 0804a000 002000 000008 00 WA 0 0 4
[ 8] .dtors PROGBITS 0804a008 002008 000008 00 WA 0 0 4
[ 9] .jcr PROGBITS 0804a010 002010 000004 00 WA 0 0 4
[10] .got PROGBITS 0804a014 002014 000058 04 WA 0 0 4
[11] .got.plt PROGBITS 0804a06c 00206c 00000c 04 WA 0 0 4
[12] .data PROGBITS 0804a078 002078 000158 00 WA 0 0 4
[13] .bss NOBITS 0804a1d0 0021d0 0025c4 00 WA 0 0 4
[14] .comment PROGBITS 00000000 0021d0 00001f 01 MS 0 0 1
[15] .debug_aranges PROGBITS 00000000 0021f0 000060 00 0 0 8
[16] .debug_info PROGBITS 00000000 002250 000112 00 0 0 1
[17] .debug_abbrev PROGBITS 00000000 002362 000024 00 0 0 1
[18] .debug_line PROGBITS 00000000 002386 0000ce 00 0 0 1
[19] .debug_ranges PROGBITS 00000000 002458 000050 00 0 0 8
[20] .shstrtab STRTAB 00000000 0024a8 0000bd 00 0 0 1
[21] .symtab SYMTAB 00000000 002900 001190 10 22 86 4
[22] .strtab STRTAB 00000000 003a90 000df9 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
There are no section groups in this file.
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x08048000 0x08048000 0x01d50 0x01d50 R E 0x1000
LOAD 0x002000 0x0804a000 0x0804a000 0x001d0 0x02794 RW 0x1000
TLS 0x002000 0x0804a000 0x0804a000 0x00000 0x00008 R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4
Section to Segment mapping:
Segment Sections...
00 .init .text .fini .rodata .eh_frame
01 .ctors .dtors .jcr .got .got.plt .data .bss
02 .tbss
03
There is no dynamic section in this file.
There are no relocations in this file.
There are no unwind sections in this file.
Symbol table '.symtab' contains 281 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 080480b4 0 SECTION LOCAL DEFAULT 1
2: 080480d0 0 SECTION LOCAL DEFAULT 2
3: 08049a90 0 SECTION LOCAL DEFAULT 3
4: 08049aa8 0 SECTION LOCAL DEFAULT 4
5: 08049b30 0 SECTION LOCAL DEFAULT 5
6: 0804a000 0 SECTION LOCAL DEFAULT 6
7: 0804a000 0 SECTION LOCAL DEFAULT 7
8: 0804a008 0 SECTION LOCAL DEFAULT 8
9: 0804a010 0 SECTION LOCAL DEFAULT 9
10: 0804a014 0 SECTION LOCAL DEFAULT 10
11: 0804a06c 0 SECTION LOCAL DEFAULT 11
12: 0804a078 0 SECTION LOCAL DEFAULT 12
13: 0804a1d0 0 SECTION LOCAL DEFAULT 13
14: 00000000 0 SECTION LOCAL DEFAULT 14
15: 00000000 0 SECTION LOCAL DEFAULT 15
16: 00000000 0 SECTION LOCAL DEFAULT 16
17: 00000000 0 SECTION LOCAL DEFAULT 17
18: 00000000 0 SECTION LOCAL DEFAULT 18
19: 00000000 0 SECTION LOCAL DEFAULT 19
20: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
21: 0804a000 0 OBJECT LOCAL DEFAULT 7 __CTOR_LIST__
22: 0804a008 0 OBJECT LOCAL DEFAULT 8 __DTOR_LIST__
23: 08049b30 0 OBJECT LOCAL DEFAULT 5 __EH_FRAME_BEGIN__
24: 0804a010 0 OBJECT LOCAL DEFAULT 9 __JCR_LIST__
25: 080480f8 0 FUNC LOCAL DEFAULT 2 __do_global_dtors_aux
26: 0804a1d0 1 OBJECT LOCAL DEFAULT 13 completed.5121
27: 0804a1d4 4 OBJECT LOCAL DEFAULT 13 dtor_idx.5123
28: 08048155 0 FUNC LOCAL DEFAULT 2 frame_dummy
29: 0804a1d8 24 OBJECT LOCAL DEFAULT 13 object.5143
30: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
31: 0804a004 0 OBJECT LOCAL DEFAULT 7 __CTOR_END__
32: 08049d4c 0 OBJECT LOCAL DEFAULT 5 __FRAME_END__
33: 0804a010 0 OBJECT LOCAL DEFAULT 9 __JCR_END__
34: 08049a70 0 FUNC LOCAL DEFAULT 2 __do_global_ctors_aux
35: 00000000 0 FILE LOCAL DEFAULT ABS initfini.c
36: 00000000 0 FILE LOCAL DEFAULT ABS test.c
37: 00000000 0 FILE LOCAL DEFAULT ABS puts.c
38: 00000000 0 FILE LOCAL DEFAULT ABS _stdio.c
39: 00000000 0 FILE LOCAL DEFAULT ABS _wcommit.c
40: 00000000 0 FILE LOCAL DEFAULT ABS _cs_funcs.c
41: 00000000 0 FILE LOCAL DEFAULT ABS fputc_unlocked.c
42: 00000000 0 FILE LOCAL DEFAULT ABS fputs_unlocked.c
43: 00000000 0 FILE LOCAL DEFAULT ABS fwrite_unlocked.c
44: 00000000 0 FILE LOCAL DEFAULT ABS strlen.c
45: 00000000 0 FILE LOCAL DEFAULT ABS isatty.c
46: 00000000 0 FILE LOCAL DEFAULT ABS tcgetattr.c
47: 00000000 0 FILE LOCAL DEFAULT ABS libc-cancellation.c
48: 00000000 0 FILE LOCAL DEFAULT ABS __uClibc_main.c
49: 00000000 0 FILE LOCAL DEFAULT ABS getegid.c
50: 00000000 0 FILE LOCAL DEFAULT ABS geteuid.c
51: 00000000 0 FILE LOCAL DEFAULT ABS getgid.c
52: 00000000 0 FILE LOCAL DEFAULT ABS getuid.c
53: 00000000 0 FILE LOCAL DEFAULT ABS ioctl.c
54: 00000000 0 FILE LOCAL DEFAULT ABS __syscall_fcntl.c
55: 00000000 0 FILE LOCAL DEFAULT ABS llseek.c
56: 00000000 0 FILE LOCAL DEFAULT ABS errno.c
57: 00000000 0 FILE LOCAL DEFAULT ABS _WRITE.c
58: 00000000 0 FILE LOCAL DEFAULT ABS _fwrite.c
59: 00000000 0 FILE LOCAL DEFAULT ABS _trans2w.c
60: 00000000 0 FILE LOCAL DEFAULT ABS memcpy.c
61: 00000000 0 FILE LOCAL DEFAULT ABS strrchr.c
62: 00000000 0 FILE LOCAL DEFAULT ABS memrchr.c
63: 00000000 0 FILE LOCAL DEFAULT ABS abort.c
64: 00000000 0 FILE LOCAL DEFAULT ABS exit.c
65: 00000000 0 FILE LOCAL DEFAULT ABS raise.c
66: 00000000 0 FILE LOCAL DEFAULT ABS libc-tls.c
67: 00000000 0 FILE LOCAL DEFAULT ABS dl-support.c
68: 00000000 0 FILE LOCAL DEFAULT ABS sigaction.c
69: 00000000 0 FILE LOCAL DEFAULT ABS _exit.c
70: 00000000 0 FILE LOCAL DEFAULT ABS sbrk.c
71: 00000000 0 FILE LOCAL DEFAULT ABS sigprocmask.c
72: 00000000 0 FILE LOCAL DEFAULT ABS __syscall_rt_sigaction.c
73: 00000000 0 FILE LOCAL DEFAULT ABS fseeko.c
74: 00000000 0 FILE LOCAL DEFAULT ABS fseeko64.c
75: 00000000 0 FILE LOCAL DEFAULT ABS _adjust_pos.c
76: 00000000 0 FILE LOCAL DEFAULT ABS memset.c
77: 00000000 0 FILE LOCAL DEFAULT ABS mempcpy.c
78: 00000000 0 FILE LOCAL DEFAULT ABS brk.c
79: 0804a000 0 NOTYPE LOCAL DEFAULT 6 __fini_array_end
80: 0804a000 0 NOTYPE LOCAL DEFAULT 6 __fini_array_start
81: 0804a000 0 NOTYPE LOCAL DEFAULT 6 __init_array_end
82: 0804a000 0 NOTYPE LOCAL DEFAULT 6 __preinit_array_end
83: 0804a06c 0 OBJECT LOCAL DEFAULT 11 _GLOBAL_OFFSET_TABLE_
84: 0804a000 0 NOTYPE LOCAL DEFAULT 6 __init_array_start
85: 0804a000 0 NOTYPE LOCAL DEFAULT 6 __preinit_array_start
86: 080486f5 4 FUNC GLOBAL HIDDEN 2 __x86.get_pc_thunk.cx
87: 0804962f 92 FUNC GLOBAL DEFAULT 2 __libc_sigaction
88: 08048c2c 139 FUNC GLOBAL DEFAULT 2 ioctl
89: 0804a208 4 OBJECT GLOBAL DEFAULT 13 _stdio_openlist_use_count
90: 0804968b 62 FUNC WEAK HIDDEN 2 __GI_sigaction
91: 08048c1c 8 FUNC GLOBAL DEFAULT 2 getgid
92: 0804a084 4 OBJECT GLOBAL DEFAULT 12 stdout
93: 0804845c 153 FUNC GLOBAL DEFAULT 2 putc_unlocked
94: 080488c2 72 FUNC GLOBAL HIDDEN 2 __GI___uClibc_fini
95: 08048898 3 FUNC WEAK DEFAULT 2 __pthread_mutex_lock
96: 080488c2 72 FUNC GLOBAL DEFAULT 2 __uClibc_fini
97: 08049088 29 FUNC GLOBAL DEFAULT 2 memrchr
98: 08048c14 8 FUNC GLOBAL DEFAULT 2 geteuid
99: 0804c210 4 OBJECT GLOBAL DEFAULT 13 __libc_stack_end
100: 08048d26 153 FUNC GLOBAL DEFAULT 2 __libc_fcntl
101: 08048700 112 FUNC WEAK DEFAULT 2 __write
102: 00000000 4 TLS GLOBAL DEFAULT 6 errno
103: 08048c0c 8 FUNC GLOBAL DEFAULT 2 getegid
104: 0804971c 79 FUNC GLOBAL HIDDEN 2 __GI_sbrk
105: 08048946 68 FUNC GLOBAL HIDDEN 2 __GI___uClibc_init
106: 00000004 4 TLS GLOBAL HIDDEN 6 __libc_h_errno
107: 08048dc0 119 FUNC GLOBAL HIDDEN 2 __GI_lseek64
108: 08048770 112 FUNC WEAK DEFAULT 2 __read
109: 0804c76c 4 OBJECT GLOBAL DEFAULT 13 _dl_tls_static_used
110: 08049048 35 FUNC GLOBAL DEFAULT 2 memcpy
111: 00000000 0 NOTYPE WEAK HIDDEN UND _locale_init
112: 080484f8 41 FUNC GLOBAL HIDDEN 2 __GI_fputs_unlocked
113: 0804925a 29 FUNC GLOBAL HIDDEN 2 __GI___open_nocancel
114: 0804a00c 0 OBJECT GLOBAL HIDDEN 8 __DTOR_END__
115: 080481d8 157 FUNC GLOBAL DEFAULT 2 puts
116: 0804889b 3 FUNC WEAK DEFAULT 2 __pthread_mutex_init
117: 08048c24 8 FUNC GLOBAL DEFAULT 2 getuid
118: 08049250 112 FUNC WEAK DEFAULT 2 __open
119: 080485b8 27 FUNC GLOBAL DEFAULT 2 isatty
120: 08048770 112 FUNC WEAK HIDDEN 2 __GI_read
121: 0804870a 29 FUNC GLOBAL HIDDEN 2 __GI___write_nocancel
122: 0804a07c 0 OBJECT GLOBAL HIDDEN 12 __dso_handle
123: 08048404 15 FUNC GLOBAL HIDDEN 2 _cs_close
124: 00000000 0 NOTYPE WEAK DEFAULT UND __nptl_deallocate_tsd
125: 080495d9 68 FUNC GLOBAL HIDDEN 2 _dl_nothread_init_static_
126: 080488b0 18 FUNC WEAK DEFAULT 2 _pthread_cleanup_pop_rest
127: 08048d26 153 FUNC GLOBAL HIDDEN 2 __GI___libc_fcntl
128: 080499e4 46 FUNC GLOBAL HIDDEN 2 __GI_memset
129: 08049a14 30 FUNC WEAK DEFAULT 2 mempcpy
130: 08048700 112 FUNC WEAK HIDDEN 2 __GI_write
131: 08048770 112 FUNC GLOBAL DEFAULT 2 __libc_read
132: 080487e0 90 FUNC GLOBAL HIDDEN 2 __libc_disable_asynccance
133: 08049250 112 FUNC WEAK HIDDEN 2 __GI_open
134: 0804c770 4 OBJECT GLOBAL DEFAULT 13 _dl_tls_static_align
135: 080485d4 96 FUNC GLOBAL HIDDEN 2 __GI_tcgetattr
136: 0804c214 4 OBJECT GLOBAL DEFAULT 13 __environ
137: 080496cc 78 FUNC WEAK DEFAULT 2 _Exit
138: 0804c774 4 OBJECT GLOBAL DEFAULT 13 _dl_tls_max_dtv_idx
139: 080490a8 204 FUNC GLOBAL DEFAULT 2 abort
140: 08048d26 153 FUNC WEAK HIDDEN 2 __GI_fcntl
141: 08048524 126 FUNC GLOBAL HIDDEN 2 __GI_fwrite_unlocked
142: 08048c1c 8 FUNC GLOBAL HIDDEN 2 __GI_getgid
143: 0804925a 29 FUNC GLOBAL DEFAULT 2 __open_nocancel
144: 080480b4 0 FUNC GLOBAL DEFAULT 1 _init
145: 08048770 112 FUNC WEAK HIDDEN 2 __GI___read
146: 08049a14 30 FUNC GLOBAL HIDDEN 2 __GI_mempcpy
147: 0804906c 26 FUNC GLOBAL DEFAULT 2 strrchr
148: 00000004 4 TLS GLOBAL DEFAULT 6 h_errno
149: 08048898 3 FUNC WEAK DEFAULT 2 __pthread_mutex_unlock
150: 00000000 0 NOTYPE WEAK DEFAULT UND __register_frame_info_bas
151: 08049174 98 FUNC GLOBAL HIDDEN 2 __GI_exit
152: 0804c21c 4 OBJECT GLOBAL HIDDEN 13 __app_fini
153: 0804c228 4 OBJECT GLOBAL HIDDEN 13 __exit_cleanup
154: 0804906c 26 FUNC GLOBAL DEFAULT 2 rindex
155: 08048700 112 FUNC WEAK DEFAULT 2 write
156: 0804c214 4 OBJECT WEAK DEFAULT 13 environ
157: 08048690 101 FUNC WEAK HIDDEN 2 __GI_close
158: 080484f8 41 FUNC GLOBAL DEFAULT 2 fputs_unlocked
159: 08048898 3 FUNC WEAK DEFAULT 2 __pthread_mutex_trylock
160: 08049a34 60 FUNC GLOBAL HIDDEN 2 __GI_brk
161: 0804c778 4 OBJECT GLOBAL DEFAULT 13 _dl_tls_static_size
162: 0804a08c 4 OBJECT GLOBAL DEFAULT 12 _stdio_openlist
163: 0804976c 70 FUNC GLOBAL HIDDEN 2 __GI_sigprocmask
164: 080497fc 24 FUNC GLOBAL HIDDEN 2 __GI_fseek
165: 08048700 112 FUNC GLOBAL HIDDEN 2 __GI___libc_write
166: 080497fc 24 FUNC GLOBAL DEFAULT 2 fseeko
167: 0804a20c 4 OBJECT GLOBAL DEFAULT 13 _stdio_openlist_del_count
168: 080497fc 24 FUNC GLOBAL DEFAULT 2 fseek
169: 08049250 112 FUNC WEAK HIDDEN 2 __GI___open
170: 0804877a 29 FUNC GLOBAL DEFAULT 2 __read_nocancel
171: 08049597 29 FUNC WEAK DEFAULT 2 __pthread_initialize_mini
172: 0804a080 4 OBJECT GLOBAL DEFAULT 12 stdin
173: 080485b8 27 FUNC GLOBAL HIDDEN 2 __GI_isatty
174: 0804c77c 4 OBJECT GLOBAL DEFAULT 13 _dl_tls_dtv_slotinfo_list
175: 0804a194 4 OBJECT WEAK DEFAULT 12 __progname
176: 080480d0 34 FUNC GLOBAL DEFAULT 2 _start
177: 00000000 0 NOTYPE WEAK DEFAULT UND __deregister_frame_info_b
178: 0804877a 29 FUNC GLOBAL HIDDEN 2 __GI___read_nocancel
179: 08048c2c 139 FUNC GLOBAL HIDDEN 2 __GI_ioctl
180: 00000000 4 TLS GLOBAL HIDDEN 6 __libc_errno
181: 08048770 112 FUNC WEAK DEFAULT 2 read
182: 08049048 35 FUNC GLOBAL HIDDEN 2 __GI_memcpy
183: 0804a090 4 OBJECT GLOBAL DEFAULT 12 _stdio_user_locking
184: 08048690 101 FUNC GLOBAL HIDDEN 2 __GI___libc_close
185: 0804a194 4 OBJECT GLOBAL DEFAULT 12 program_invocation_short_
186: 0804c780 1 OBJECT GLOBAL DEFAULT 13 _dl_tls_dtv_gaps
187: 0804845c 153 FUNC GLOBAL HIDDEN 2 __GI___fputc_unlocked
188: 08049930 180 FUNC GLOBAL HIDDEN 2 __stdio_adjust_position
189: 08048cb8 110 FUNC GLOBAL HIDDEN 2 __GI___fcntl_nocancel
190: 0804968b 62 FUNC WEAK DEFAULT 2 sigaction
191: 0804c78c 4 OBJECT GLOBAL DEFAULT 13 _dl_phdr
192: 08048946 68 FUNC GLOBAL DEFAULT 2 __uClibc_init
193: 0804a190 4 OBJECT GLOBAL HIDDEN 12 __uclibc_progname
194: 08048c0c 8 FUNC GLOBAL HIDDEN 2 __GI_getegid
195: 0804898a 605 FUNC GLOBAL DEFAULT 2 __uClibc_main
196: 0804971c 79 FUNC GLOBAL DEFAULT 2 sbrk
197: 0804c220 4 OBJECT GLOBAL HIDDEN 13 __rtld_fini
198: 08048690 101 FUNC GLOBAL DEFAULT 2 __libc_close
199: 0804889e 18 FUNC WEAK DEFAULT 2 _pthread_cleanup_push_def
200: 0804a1d0 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
201: 08049250 112 FUNC GLOBAL DEFAULT 2 __libc_open
202: 00000000 0 NOTYPE WEAK DEFAULT UND __pthread_unwind
203: 080499e4 46 FUNC GLOBAL DEFAULT 2 memset
204: 080481a8 46 FUNC GLOBAL DEFAULT 2 main
205: 08048eb4 249 FUNC GLOBAL HIDDEN 2 __stdio_fwrite
206: 080492c0 105 FUNC GLOBAL DEFAULT 2 _dl_tls_setup
207: 0804c784 4 OBJECT GLOBAL DEFAULT 13 _dl_tls_generation
208: 00000000 0 NOTYPE WEAK DEFAULT UND __nptl_nthreads
209: 080497b4 69 FUNC GLOBAL DEFAULT 2 __syscall_rt_sigaction
210: 080485d4 96 FUNC GLOBAL DEFAULT 2 tcgetattr
211: 080490a8 204 FUNC GLOBAL HIDDEN 2 __GI_abort
212: 08048700 112 FUNC WEAK HIDDEN 2 __GI___write
213: 0804869a 23 FUNC GLOBAL HIDDEN 2 __GI___close_nocancel
214: 08048413 41 FUNC GLOBAL HIDDEN 2 _cs_seek
215: 080496cc 78 FUNC GLOBAL HIDDEN 2 __GI__exit
216: 0804906c 26 FUNC GLOBAL HIDDEN 2 __GI_strrchr
217: 0804a078 0 NOTYPE WEAK DEFAULT 12 data_start
218: 00000000 0 NOTYPE WEAK DEFAULT UND __h_errno_location
219: 0804845c 153 FUNC GLOBAL HIDDEN 2 __GI_putc_unlocked
220: 0804883a 91 FUNC GLOBAL HIDDEN 2 __libc_enable_asynccancel
221: 08049a90 0 FUNC GLOBAL DEFAULT 3 _fini
222: 0804870a 29 FUNC GLOBAL DEFAULT 2 __write_nocancel
223: 080480f4 0 FUNC GLOBAL HIDDEN 2 __get_pc_thunk_bx
224: 080482d9 259 FUNC GLOBAL HIDDEN 2 _stdio_term
225: 0804a088 4 OBJECT GLOBAL DEFAULT 12 stderr
226: 0804844b 15 FUNC GLOBAL HIDDEN 2 _cs_read
227: 08049329 622 FUNC GLOBAL DEFAULT 2 __libc_setup_tls
228: 0804869a 23 FUNC GLOBAL DEFAULT 2 __close_nocancel
229: 0804a1cc 4 OBJECT GLOBAL DEFAULT 12 _dl_init_static_tls
230: 0804a1b4 24 OBJECT GLOBAL DEFAULT 12 __atexit_lock
231: 08048cb8 110 FUNC GLOBAL DEFAULT 2 __fcntl_nocancel
232: 08049814 261 FUNC GLOBAL HIDDEN 2 __GI_fseeko64
233: 0804c788 4 OBJECT GLOBAL DEFAULT 13 _dl_tls_static_nelem
234: 080483dc 37 FUNC GLOBAL HIDDEN 2 __stdio_wcommit
235: 08048524 126 FUNC GLOBAL DEFAULT 2 fwrite_unlocked
236: 0804c218 4 OBJECT GLOBAL DEFAULT 13 __pagesize
237: 0804a1f0 12 OBJECT GLOBAL DEFAULT 13 _stdio_openlist_add_lock
238: 08048690 101 FUNC WEAK DEFAULT 2 __close
239: 0804a1d0 0 NOTYPE GLOBAL DEFAULT ABS _edata
240: 08048690 101 FUNC WEAK HIDDEN 2 __GI___close
241: 08049088 29 FUNC GLOBAL HIDDEN 2 __GI_memrchr
242: 0804c794 0 NOTYPE GLOBAL DEFAULT ABS _end
243: 0804845c 153 FUNC GLOBAL HIDDEN 2 __GI_fputc_unlocked
244: 0804843c 15 FUNC GLOBAL HIDDEN 2 _cs_write
245: 0804968b 62 FUNC GLOBAL DEFAULT 2 __sigaction
246: 0804c768 4 OBJECT GLOBAL HIDDEN 13 __curbrk
247: 0804c790 4 OBJECT GLOBAL DEFAULT 13 _dl_phnum
248: 00000000 0 NOTYPE WEAK DEFAULT UND __errno_location
249: 08049250 112 FUNC GLOBAL HIDDEN 2 __GI___libc_open
250: 08049174 98 FUNC GLOBAL DEFAULT 2 exit
251: 08048e38 123 FUNC GLOBAL HIDDEN 2 __stdio_WRITE
252: 0804828c 77 FUNC GLOBAL HIDDEN 2 _stdio_init
253: 08048c14 8 FUNC GLOBAL HIDDEN 2 __GI_geteuid
254: 08049a34 60 FUNC GLOBAL DEFAULT 2 brk
255: 080495b4 37 FUNC GLOBAL DEFAULT 2 _dl_aux_init
256: 0804a1fc 12 OBJECT GLOBAL DEFAULT 13 _stdio_openlist_del_lock
257: 08048be8 34 FUNC GLOBAL DEFAULT 2 _setjmp
258: 080496cc 78 FUNC GLOBAL DEFAULT 2 _exit
259: 08048640 40 FUNC GLOBAL HIDDEN 2 __lll_lock_wait_private
260: 080485a4 19 FUNC GLOBAL DEFAULT 2 strlen
261: 08048dc0 119 FUNC GLOBAL DEFAULT 2 lseek64
262: 08049250 112 FUNC WEAK DEFAULT 2 open
263: 0804a198 4 OBJECT GLOBAL DEFAULT 12 program_invocation_name
264: 08048700 112 FUNC GLOBAL DEFAULT 2 __libc_write
265: 08048c24 8 FUNC GLOBAL HIDDEN 2 __GI_getuid
266: 08048fb0 149 FUNC GLOBAL HIDDEN 2 __stdio_trans2w_o
267: 080491d8 116 FUNC GLOBAL HIDDEN 2 __GI_raise
268: 0804a078 0 NOTYPE GLOBAL DEFAULT 12 __data_start
269: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
270: 08048770 112 FUNC GLOBAL HIDDEN 2 __GI___libc_read
271: 0804845c 153 FUNC GLOBAL DEFAULT 2 fputc_unlocked
272: 08048d26 153 FUNC WEAK DEFAULT 2 fcntl
273: 08049814 261 FUNC GLOBAL DEFAULT 2 fseeko64
274: 08048690 101 FUNC WEAK DEFAULT 2 close
275: 080485a4 19 FUNC GLOBAL HIDDEN 2 __GI_strlen
276: 0804a198 4 OBJECT WEAK DEFAULT 12 __progname_full
277: 08048670 32 FUNC GLOBAL HIDDEN 2 __lll_unlock_wake_private
278: 080491d8 116 FUNC GLOBAL DEFAULT 2 raise
279: 0804976c 70 FUNC GLOBAL DEFAULT 2 sigprocmask
280: 0804845c 153 FUNC GLOBAL DEFAULT 2 __fputc_unlocked
No version information found in this file.
Regards,
Mahanteshwari Hiremath.
________________________________________
From: WANG.Jiong [wong.kwongyuan at gmail.com]
Sent: Monday, October 24, 2011 11:13 AM
To: Mahanteshwari Hiremath
Cc: Rob Landley; uclibc at uclibc.org
Subject: Re: init: cannot load libc.so.0, kernel panic:trying to kill init
Hi Mahanteshwari:
I think your kernel is OK, because it has run to init, that is your
kernel has finished boot up and try to init the first userspace process.
as Rob has suggested, could you please attach the results
readelf -a hello
hello is just a simple helloworld compiled by your toolchain
---
Regards,
WANG.Jiong
On 10/24/2011 12:45 PM, Mahanteshwari Hiremath wrote:
> Hi Rob,
> the generated binaries are successfully running on my linux desktop machine, as Mr.Wang Jiong said to use '-static' accordingly every uclibc commands are working and I am able to complile my programs also.
>
> BUT THE PROBLEM HERE IS , ROOTFS generated by build root(rootfs.ext2).
> hey I am doing Linux Board bringing up project where in I am using the ROOTFS generated by buildroot, and while bootng it gives error msg saying,
>
>> /sbin/init:can't load libc.so.0
>> kernel panic: trying to kill init
> I see all necessary library file present in RFS /lib of buildroot
>
> and below is what /lib contents(buildroot RFS),
>
> drwxr-xr-x 28 root root 4096 2011-10-19 16:48 firmware
> -rwxr-xr-x 1 root root 25192 2011-10-21 15:08 ld-uClibc-0.9.32.so
> lrwxrwxrwx 1 root root 19 2011-10-21 15:08 ld-uClibc.so.0 -> ld-uClibc-0.9.32.so
> -rwxr-xr-x 1 root root 8796 2011-10-21 15:08 libcrypt-0.9.32.so
> lrwxrwxrwx 1 root root 18 2011-10-21 15:08 libcrypt.so.0 -> libcrypt-0.9.32.so
> lrwxrwxrwx 1 root root 19 2011-10-21 15:08 libc.so.0 -> libuClibc-0.9.32.so
> -rwxr-xr-x 1 root root 8944 2011-10-21 15:08 libdl-0.9.32.so
> lrwxrwxrwx 1 root root 15 2011-10-21 15:08 libdl.so.0 -> libdl-0.9.32.so
> -rwxr-xr-x 1 root root 41664 2011-10-21 15:08 libm-0.9.32.so
> lrwxrwxrwx 1 root root 14 2011-10-21 15:08 libm.so.0 -> libm-0.9.32.so
> -rwxr-xr-x 1 root root 4592 2011-10-21 15:08 libnsl-0.9.32.so
> lrwxrwxrwx 1 root root 16 2011-10-21 15:08 libnsl.so.0 -> libnsl-0.9.32.so
> -rwxr-xr-x 1 root root 62940 2011-10-21 15:08 libpthread-0.9.32.so
> lrwxrwxrwx 1 root root 20 2011-10-21 15:08 libpthread.so.0 -> libpthread-0.9.32.so
> -rwxr-xr-x 1 root root 4592 2011-10-21 15:08 libresolv-0.9.32.so
> lrwxrwxrwx 1 root root 19 2011-10-21 15:08 libresolv.so.0 -> libresolv-0.9.32.so
> -rwxr-xr-x 1 root root 13096 2011-10-21 15:08 librt-0.9.32.so
> lrwxrwxrwx 1 root root 15 2011-10-21 15:08 librt.so.0 -> librt-0.9.32.so
> -rwxr-xr-x 1 root root 314384 2011-10-21 15:08 libuClibc-0.9.32.so
> -rwxr-xr-x 1 root root 4656 2011-10-21 15:08 libutil-0.9.32.so
> lrwxrwxrwx 1 root root 17 2011-10-21 15:08 libutil.so.0 -> libutil-0.9.32.so
> drwxr-xr-x 3 root root 4096 2011-10-19 16:46 modules
>
> and in /usr/lib I ahve put all linker libraries,
>
>
> -rw-r--r-- 1 root root 804 2011-10-21 15:08 crt1.o
> -rw-r--r-- 1 root root 2024 2011-10-21 15:08 crti.o
> -rw-r--r-- 1 root root 1828 2011-10-21 15:08 crtn.o
> -rw-r--r-- 1 root root 1278948 2011-10-21 15:08 libc.a
> lrwxrwxrwx 1 root root 6 2011-10-21 15:08 libc_pic.a -> libc.a
> -rw-r--r-- 1 root root 14286 2011-10-21 15:08 libcrypt.a
> lrwxrwxrwx 1 root root 10 2011-10-21 15:08 libcrypt_pic.a -> libcrypt.a
> lrwxrwxrwx 1 root root 23 2011-10-21 15:08 libcrypt.so -> ../../lib/libcrypt.so.0
> -rw-r--r-- 1 root root 276 2011-10-21 15:08 libc.so
> -rw-r--r-- 1 root root 22454 2011-10-21 15:08 libdl.a
> lrwxrwxrwx 1 root root 7 2011-10-21 15:08 libdl_pic.a -> libdl.a
> lrwxrwxrwx 1 root root 20 2011-10-21 15:08 libdl.so -> ../../lib/libdl.so.0
> -rw-r--r-- 1 root root 205280 2011-10-21 15:08 libm.a
> lrwxrwxrwx 1 root root 6 2011-10-21 15:08 libm_pic.a -> libm.a
> lrwxrwxrwx 1 root root 19 2011-10-21 15:08 libm.so -> ../../lib/libm.so.0
> -rw-r--r-- 1 root root 908 2011-10-21 15:08 libnsl.a
> lrwxrwxrwx 1 root root 8 2011-10-21 15:08 libnsl_pic.a -> libnsl.a
> lrwxrwxrwx 1 root root 21 2011-10-21 15:08 libnsl.so -> ../../lib/libnsl.so.0
> -rw-r--r-- 1 root root 224086 2011-10-21 15:08 libpthread.a
> -rw-r--r-- 1 root root 1164 2011-10-21 15:08 libpthread_nonshared.a
> lrwxrwxrwx 1 root root 22 2011-10-21 15:08 libpthread_nonshared_pic.a -> libpthread_nonshared.a
> lrwxrwxrwx 1 root root 12 2011-10-21 15:08 libpthread_pic.a -> libpthread.a
> -rw-r--r-- 1 root root 189 2011-10-21 15:08 libpthread.so
> -rw-r--r-- 1 root root 914 2011-10-21 15:08 libresolv.a
> lrwxrwxrwx 1 root root 11 2011-10-21 15:08 libresolv_pic.a -> libresolv.a
> lrwxrwxrwx 1 root root 24 2011-10-21 15:08 libresolv.so -> ../../lib/libresolv.so.0
> -rw-r--r-- 1 root root 28020 2011-10-21 15:08 librt.a
> lrwxrwxrwx 1 root root 7 2011-10-21 15:08 librt_pic.a -> librt.a
> lrwxrwxrwx 1 root root 20 2011-10-21 15:08 librt.so -> ../../lib/librt.so.0
> -rw-r--r-- 1 root root 7476 2011-10-21 15:08 libutil.a
> lrwxrwxrwx 1 root root 9 2011-10-21 15:08 libutil_pic.a -> libutil.a
> lrwxrwxrwx 1 root root 22 2011-10-21 15:08 libutil.so -> ../../lib/libutil.so.0
> -rw-r--r-- 1 root root 868 2011-10-21 15:08 Scrt1.o
> -rw-r--r-- 1 root root 988 2011-10-21 15:08 uclibc_nonshared.a
>
> I feel, now you understood my problem.
> Kindly give some ideas, so I can bring up my Kernel.
>
>
>
>
> Regards,
> Mahanteshwari Hiremath.
>
> ________________________________________
> From: Rob Landley [rob at landley.net]
> Sent: Friday, October 21, 2011 10:51 PM
> To: Mahanteshwari Hiremath
> Cc: WANG.Jiong; uclibc at uclibc.org
> Subject: Re: init: cannot load libc.so.0, kernel panic:trying to kill init
>
> On 10/21/2011 05:02 AM, Mahanteshwari Hiremath wrote:
>> Hi WANG.Jiong,
>>
>> Thanks for your reply.
>> It really helped me to run standalone application on my linux machine.
>> Problem what I am facing is with the x86 board, which is failing to boot.
>> I have used rootfs generated from buildroot along with toolchains which gives the following error during boot :
>>
>> >/sbin/init:can't load libc.so.0
>> >kernel panic: trying to kill init
>>
>> Please help me out in solving the issue. Im not even able to do anything as it is showing kernel panic.
> Run uClibc's ldd against your binary. (Note that glibc's won't work
> against uClibc, but uClibc's will work against glibc. Which is better
> is left as an exercise for the reader.)
>
> If you haven't got uClibc's ldd, run readelf -a against it and grep for
> the word "interpreter".
>
> Rob
>
>
> Larsen & Toubro Limited
>
> www.larsentoubro.com
>
> This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
Larsen & Toubro Limited
www.larsentoubro.com
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
More information about the uClibc
mailing list