OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / uClibc / docs / pthreads_hacking.txt
1 # Run me as a shell script in uclibc lib/*
2
3
4 # Dump the list of dynamic symbols from libpthread
5 # and compare libpthread's exported symbols of uclibc with glibc
6 # (adjust /lib64/libpthread-*.*.so as needed).
7 # The resulting diff is suspiciously large.
8 # We export a lot of stuff which glibc does not.
9
10 readelf -sDW libpthread-*.*.so \
11 | grep '^ *[0-9]' \
12 | sed 's/^[0-9a-f: ]*[^ ]\(  *[A-Z]\)/\1/' \
13 | sed 's/ [0-9] / N /' | sed 's/ [0-9][0-9] /  N /' | sed 's/ [0-9][0-9][0-9] /   N /' \
14 | sort -k5 | uniq \
15 >uclibc.lst
16
17 readelf -sDW /lib64/libpthread-*.*.so \
18 | grep '^ *[0-9]' \
19 | sed 's/^[0-9a-f: ]*[^ ]\(  *[A-Z]\)/\1/' \
20 | sed 's/ [0-9] / N /' | sed 's/ [0-9][0-9] /  N /' | sed 's/ [0-9][0-9][0-9] /   N /' \
21 | sort -k5 | uniq \
22 >glibc.lst
23 diff -u uclibc.lst glibc.lst >ug.diff
24
25
26 # Check which exported symbols from libpthread are never referenced
27 # from other libraries. Generally, I'd expect a very few __functions
28 # with two underscores to be exported and not used by e.g. libc-X.X.X.so,
29 # as these names are supposed to be internal, i.e. external programs
30 # usually don't call them. On my system, I got 141 such __functions.
31 # Examples:
32 # __flockfilelist - NOP function (why do we need it at all?)
33 # __pthread_perform_cleanup - called only from within libpthread
34
35 echo *-*.*.*.so | xargs -n1 | grep -v libpthread | xargs readelf -aW >full_dump.lst
36 >uclibc_unrefd.lst
37 >uclibc_refd.lst
38 sed 's/^.* //g' uclibc.lst \
39 | while read symbol; do
40         if grep -F -- "$symbol" full_dump.lst >/dev/null 2>&1; then
41                 echo "$symbol" >>uclibc_refd.lst
42         else
43                 echo "$symbol" >>uclibc_unrefd.lst
44         fi
45 done
46
47 exit
48
49
50 In case you don't have a glibc system to try it,
51 ug.diff from vda's system is below.
52
53 --- uclibc.lst  2009-03-16 03:07:58.000000000 +0100
54 +++ glibc.lst   2009-03-16 03:07:58.000000000 +0100
55 @@ -1,188 +1,173 @@
56 -  NOTYPE GLOBAL DEFAULT ABS __bss_start
57 -    FUNC GLOBAL DEFAULT   N __compare_and_swap
58 +  OBJECT GLOBAL DEFAULT ABS GLIBC_2.2.5
59 +  OBJECT GLOBAL DEFAULT ABS GLIBC_2.2.6
60 +  OBJECT GLOBAL DEFAULT ABS GLIBC_2.3.2
61 +  OBJECT GLOBAL DEFAULT ABS GLIBC_2.3.3
62 +  OBJECT GLOBAL DEFAULT ABS GLIBC_2.3.4
63 +  OBJECT GLOBAL DEFAULT ABS GLIBC_2.4
64 +  OBJECT GLOBAL DEFAULT ABS GLIBC_PRIVATE
65 +    FUNC GLOBAL DEFAULT   N _IO_flockfile
66 +    FUNC GLOBAL DEFAULT   N _IO_ftrylockfile
67 +    FUNC GLOBAL DEFAULT   N _IO_funlockfile
68 +  NOTYPE   WEAK DEFAULT UND _Jv_RegisterClasses
69 +    FUNC GLOBAL DEFAULT UND __clone
70 +    FUNC   WEAK DEFAULT   N __close
71 +    FUNC   WEAK DEFAULT   N __connect
72 +    FUNC   WEAK DEFAULT UND __cxa_finalize
73 +    FUNC GLOBAL DEFAULT UND __endmntent
74      FUNC GLOBAL DEFAULT   N __errno_location
75 -    FUNC GLOBAL DEFAULT   N __flockfilelist
76 -    FUNC GLOBAL DEFAULT   N __fresetlockfiles
77 -    FUNC GLOBAL DEFAULT   N __funlockfilelist
78 +    FUNC   WEAK DEFAULT   N __fcntl
79 +    FUNC GLOBAL DEFAULT   N __fork
80 +    FUNC GLOBAL DEFAULT UND __fxstat64
81 +    FUNC GLOBAL DEFAULT UND __getdelim
82 +    FUNC GLOBAL DEFAULT UND __getmntent_r
83 +    FUNC GLOBAL DEFAULT UND __getpagesize
84 +    FUNC GLOBAL DEFAULT UND __gettimeofday
85      FUNC GLOBAL DEFAULT   N __h_errno_location
86 -    FUNC GLOBAL DEFAULT   N __linuxthreads_create_event
87 -    FUNC GLOBAL DEFAULT   N __linuxthreads_death_event
88 -  OBJECT GLOBAL DEFAULT   N __linuxthreads_initial_report_events
89 -  OBJECT GLOBAL DEFAULT   N __linuxthreads_pthread_key_2ndlevel_size
90 -  OBJECT GLOBAL DEFAULT   N __linuxthreads_pthread_keys_max
91 -  OBJECT GLOBAL DEFAULT   N __linuxthreads_pthread_sizeof_descr
92 -  OBJECT GLOBAL DEFAULT   N __linuxthreads_pthread_threads_max
93 -    FUNC GLOBAL DEFAULT   N __linuxthreads_reap_event
94 -  OBJECT GLOBAL DEFAULT   N __linuxthreads_version
95 -    FUNC GLOBAL DEFAULT   N __pthread_alt_lock
96 -    FUNC GLOBAL DEFAULT   N __pthread_alt_timedlock
97 -    FUNC GLOBAL DEFAULT   N __pthread_alt_unlock
98 -    FUNC GLOBAL DEFAULT   N __pthread_attr_destroy
99 -    FUNC GLOBAL DEFAULT   N __pthread_attr_getdetachstate
100 -    FUNC GLOBAL DEFAULT   N __pthread_attr_getguardsize
101 -    FUNC GLOBAL DEFAULT   N __pthread_attr_getinheritsched
102 -    FUNC GLOBAL DEFAULT   N __pthread_attr_getschedparam
103 -    FUNC GLOBAL DEFAULT   N __pthread_attr_getschedpolicy
104 -    FUNC GLOBAL DEFAULT   N __pthread_attr_getscope
105 -    FUNC GLOBAL DEFAULT   N __pthread_attr_getstack
106 -    FUNC GLOBAL DEFAULT   N __pthread_attr_getstacksize
107 -    FUNC GLOBAL DEFAULT   N __pthread_attr_init
108 -    FUNC GLOBAL DEFAULT   N __pthread_attr_setdetachstate
109 -    FUNC GLOBAL DEFAULT   N __pthread_attr_setguardsize
110 -    FUNC GLOBAL DEFAULT   N __pthread_attr_setinheritsched
111 -    FUNC GLOBAL DEFAULT   N __pthread_attr_setschedparam
112 -    FUNC GLOBAL DEFAULT   N __pthread_attr_setschedpolicy
113 -    FUNC GLOBAL DEFAULT   N __pthread_attr_setscope
114 -    FUNC GLOBAL DEFAULT   N __pthread_attr_setstack
115 -    FUNC GLOBAL DEFAULT   N __pthread_attr_setstacksize
116 -    FUNC GLOBAL DEFAULT   N __pthread_barrierattr_getpshared
117 -    FUNC GLOBAL DEFAULT   N __pthread_compare_and_swap
118 -    FUNC GLOBAL DEFAULT   N __pthread_cond_broadcast
119 -    FUNC GLOBAL DEFAULT   N __pthread_cond_destroy
120 -    FUNC GLOBAL DEFAULT   N __pthread_cond_init
121 -    FUNC GLOBAL DEFAULT   N __pthread_cond_signal
122 -    FUNC GLOBAL DEFAULT   N __pthread_cond_timedwait
123 -    FUNC GLOBAL DEFAULT   N __pthread_cond_wait
124 -    FUNC GLOBAL DEFAULT   N __pthread_condattr_destroy
125 -    FUNC GLOBAL DEFAULT   N __pthread_condattr_init
126 -    FUNC GLOBAL DEFAULT   N __pthread_create
127 -    FUNC GLOBAL DEFAULT   N __pthread_destroy_specifics
128 -    FUNC GLOBAL DEFAULT   N __pthread_do_exit
129 -    FUNC GLOBAL DEFAULT   N __pthread_equal
130 -    FUNC GLOBAL DEFAULT   N __pthread_exit
131 -  OBJECT GLOBAL DEFAULT   N __pthread_exit_code
132 -  OBJECT GLOBAL DEFAULT   N __pthread_exit_requested
133 -    FUNC GLOBAL DEFAULT   N __pthread_find_self
134 -  OBJECT GLOBAL DEFAULT   N __pthread_functions
135 -    FUNC GLOBAL DEFAULT   N __pthread_getconcurrency
136 -    FUNC GLOBAL DEFAULT   N __pthread_getschedparam
137 -    FUNC   WEAK DEFAULT   N __pthread_getspecific
138 -  OBJECT GLOBAL DEFAULT   N __pthread_handles
139 -  OBJECT GLOBAL DEFAULT   N __pthread_handles_num
140 -  OBJECT GLOBAL DEFAULT   N __pthread_has_cas
141 -    FUNC GLOBAL DEFAULT   N __pthread_init_max_stacksize
142 -  OBJECT GLOBAL DEFAULT   N __pthread_initial_thread
143 -  OBJECT GLOBAL DEFAULT   N __pthread_initial_thread_bos
144 -    FUNC GLOBAL DEFAULT   N __pthread_initialize
145 -    FUNC GLOBAL DEFAULT   N __pthread_initialize_manager
146 +    FUNC GLOBAL DEFAULT   N __libc_allocate_rtsig
147 +    FUNC GLOBAL DEFAULT UND __libc_allocate_rtsig_private
148 +    FUNC GLOBAL DEFAULT   N __libc_current_sigrtmax
149 +    FUNC GLOBAL DEFAULT UND __libc_current_sigrtmax_private
150 +    FUNC GLOBAL DEFAULT   N __libc_current_sigrtmin
151 +    FUNC GLOBAL DEFAULT UND __libc_current_sigrtmin_private
152 +    FUNC GLOBAL DEFAULT UND __libc_dl_error_tsd
153 +    FUNC GLOBAL DEFAULT UND __libc_dlopen_mode
154 +    FUNC GLOBAL DEFAULT UND __libc_dlsym
155 +    FUNC GLOBAL DEFAULT UND __libc_fatal
156 +    FUNC GLOBAL DEFAULT UND __libc_fork
157 +    FUNC GLOBAL DEFAULT UND __libc_longjmp
158 +    FUNC GLOBAL DEFAULT UND __libc_pthread_init
159 +  OBJECT GLOBAL DEFAULT UND __libc_stack_end
160 +    FUNC GLOBAL DEFAULT UND __libc_system
161 +    FUNC GLOBAL DEFAULT UND __libc_thread_freeres
162 +    FUNC   WEAK DEFAULT   N __lseek
163 +    FUNC   WEAK DEFAULT   N __nanosleep
164 +    FUNC   WEAK DEFAULT   N __open
165 +    FUNC   WEAK DEFAULT   N __open64
166 +    FUNC   WEAK DEFAULT   N __pread64
167 +    FUNC GLOBAL DEFAULT   N __pthread_cleanup_routine
168 +    FUNC GLOBAL DEFAULT   N __pthread_clock_gettime
169 +    FUNC GLOBAL DEFAULT   N __pthread_clock_settime
170 +    FUNC GLOBAL DEFAULT   N __pthread_getspecific
171      FUNC GLOBAL DEFAULT   N __pthread_initialize_minimal
172 -    FUNC GLOBAL DEFAULT   N __pthread_internal_tsd_address
173 -    FUNC GLOBAL DEFAULT   N __pthread_internal_tsd_get
174 -    FUNC GLOBAL DEFAULT   N __pthread_internal_tsd_set
175 -    FUNC   WEAK DEFAULT   N __pthread_key_create
176 -    FUNC GLOBAL DEFAULT   N __pthread_kill_other_threads_np
177 -  OBJECT GLOBAL DEFAULT   N __pthread_last_event
178 -    FUNC GLOBAL DEFAULT   N __pthread_lock
179 -  OBJECT GLOBAL DEFAULT   N __pthread_main_thread
180 -    FUNC GLOBAL DEFAULT   N __pthread_manager
181 -    FUNC GLOBAL DEFAULT   N __pthread_manager_adjust_prio
182 -    FUNC GLOBAL DEFAULT   N __pthread_manager_event
183 -  OBJECT GLOBAL DEFAULT   N __pthread_manager_reader
184 -  OBJECT GLOBAL DEFAULT   N __pthread_manager_request
185 -    FUNC GLOBAL DEFAULT   N __pthread_manager_sighandler
186 -  OBJECT GLOBAL DEFAULT   N __pthread_manager_thread
187 -  OBJECT GLOBAL DEFAULT   N __pthread_manager_thread_bos
188 -  OBJECT GLOBAL DEFAULT   N __pthread_manager_thread_tos
189 -  OBJECT GLOBAL DEFAULT   N __pthread_max_stacksize
190 -    FUNC   WEAK DEFAULT   N __pthread_mutex_destroy
191 -    FUNC   WEAK DEFAULT   N __pthread_mutex_init
192 -    FUNC   WEAK DEFAULT   N __pthread_mutex_lock
193 -    FUNC GLOBAL DEFAULT   N __pthread_mutex_timedlock
194 -    FUNC   WEAK DEFAULT   N __pthread_mutex_trylock
195 -    FUNC   WEAK DEFAULT   N __pthread_mutex_unlock
196 -    FUNC   WEAK DEFAULT   N __pthread_mutexattr_destroy
197 -    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_getkind_np
198 -    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_getpshared
199 -    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_gettype
200 -    FUNC   WEAK DEFAULT   N __pthread_mutexattr_init
201 -    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_setkind_np
202 -    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_setpshared
203 -    FUNC   WEAK DEFAULT   N __pthread_mutexattr_settype
204 -  OBJECT GLOBAL DEFAULT   N __pthread_nonstandard_stacks
205 -    FUNC GLOBAL DEFAULT   N __pthread_null_sighandler
206 -  OBJECT GLOBAL DEFAULT   N __pthread_offsetof_descr
207 -  OBJECT GLOBAL DEFAULT   N __pthread_offsetof_pid
208 -    FUNC   WEAK DEFAULT   N __pthread_once
209 -    FUNC GLOBAL DEFAULT   N __pthread_once_fork_child
210 -    FUNC GLOBAL DEFAULT   N __pthread_once_fork_parent
211 -    FUNC GLOBAL DEFAULT   N __pthread_once_fork_prepare
212 -    FUNC GLOBAL DEFAULT   N __pthread_perform_cleanup
213 -    FUNC GLOBAL DEFAULT   N __pthread_raise
214 -    FUNC GLOBAL DEFAULT   N __pthread_reset_main_thread
215 -    FUNC GLOBAL DEFAULT   N __pthread_restart_new
216 -    FUNC   WEAK DEFAULT   N __pthread_rwlock_destroy
217 -    FUNC   WEAK DEFAULT   N __pthread_rwlock_init
218 -    FUNC   WEAK DEFAULT   N __pthread_rwlock_rdlock
219 -    FUNC GLOBAL DEFAULT   N __pthread_rwlock_timedrdlock
220 -    FUNC GLOBAL DEFAULT   N __pthread_rwlock_timedwrlock
221 -    FUNC   WEAK DEFAULT   N __pthread_rwlock_tryrdlock
222 -    FUNC   WEAK DEFAULT   N __pthread_rwlock_trywrlock
223 -    FUNC   WEAK DEFAULT   N __pthread_rwlock_unlock
224 -    FUNC   WEAK DEFAULT   N __pthread_rwlock_wrlock
225 -    FUNC GLOBAL DEFAULT   N __pthread_rwlockattr_destroy
226 -    FUNC GLOBAL DEFAULT   N __pthread_self
227 -    FUNC GLOBAL DEFAULT   N __pthread_setcancelstate
228 -    FUNC GLOBAL DEFAULT   N __pthread_setcanceltype
229 -    FUNC GLOBAL DEFAULT   N __pthread_setconcurrency
230 -    FUNC GLOBAL DEFAULT   N __pthread_setschedparam
231 -    FUNC   WEAK DEFAULT   N __pthread_setspecific
232 -  OBJECT GLOBAL DEFAULT   N __pthread_sig_cancel
233 -  OBJECT GLOBAL DEFAULT   N __pthread_sig_debug
234 -  OBJECT GLOBAL DEFAULT   N __pthread_sig_restart
235 -    FUNC GLOBAL DEFAULT   N __pthread_sigaction
236 -    FUNC GLOBAL DEFAULT   N __pthread_sighandler
237 -    FUNC GLOBAL DEFAULT   N __pthread_sighandler_rt
238 -    FUNC GLOBAL DEFAULT   N __pthread_sigwait
239 -  OBJECT GLOBAL DEFAULT   N __pthread_sizeof_handle
240 -  OBJECT GLOBAL DEFAULT   N __pthread_smp_kernel
241 -    FUNC GLOBAL DEFAULT   N __pthread_spin_destroy
242 -    FUNC GLOBAL DEFAULT   N __pthread_spin_init
243 -    FUNC GLOBAL DEFAULT   N __pthread_spin_lock
244 -    FUNC GLOBAL DEFAULT   N __pthread_spin_trylock
245 -    FUNC GLOBAL DEFAULT   N __pthread_spin_unlock
246 -    FUNC GLOBAL DEFAULT   N __pthread_thread_self
247 -  OBJECT GLOBAL DEFAULT   N __pthread_threads_debug
248 -  OBJECT GLOBAL DEFAULT   N __pthread_threads_events
249 -  OBJECT GLOBAL DEFAULT   N __pthread_threads_max
250 -    FUNC GLOBAL DEFAULT   N __pthread_timedsuspend_new
251 -    FUNC GLOBAL DEFAULT   N __pthread_unlock
252 -    FUNC GLOBAL DEFAULT   N __pthread_wait_for_restart_signal
253 -    FUNC GLOBAL DEFAULT   N __register_atfork
254 +    FUNC GLOBAL DEFAULT   N __pthread_key_create
255 +    FUNC GLOBAL DEFAULT   N __pthread_mutex_destroy
256 +    FUNC GLOBAL DEFAULT   N __pthread_mutex_init
257 +    FUNC GLOBAL DEFAULT   N __pthread_mutex_lock
258 +    FUNC GLOBAL DEFAULT   N __pthread_mutex_trylock
259 +    FUNC GLOBAL DEFAULT   N __pthread_mutex_unlock
260 +    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_destroy
261 +    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_init
262 +    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_settype
263 +    FUNC GLOBAL DEFAULT   N __pthread_once
264 +    FUNC GLOBAL DEFAULT   N __pthread_register_cancel
265 +    FUNC GLOBAL DEFAULT   N __pthread_register_cancel_defer
266 +    FUNC GLOBAL DEFAULT   N __pthread_rwlock_destroy
267 +    FUNC GLOBAL DEFAULT   N __pthread_rwlock_init
268 +    FUNC GLOBAL DEFAULT   N __pthread_rwlock_rdlock
269 +    FUNC GLOBAL DEFAULT   N __pthread_rwlock_tryrdlock
270 +    FUNC GLOBAL DEFAULT   N __pthread_rwlock_trywrlock
271 +    FUNC GLOBAL DEFAULT   N __pthread_rwlock_unlock
272 +    FUNC GLOBAL DEFAULT   N __pthread_rwlock_wrlock
273 +    FUNC GLOBAL DEFAULT   N __pthread_setspecific
274 +    FUNC GLOBAL DEFAULT   N __pthread_unregister_cancel
275 +    FUNC GLOBAL DEFAULT   N __pthread_unregister_cancel_restore
276 +    FUNC GLOBAL DEFAULT   N __pthread_unwind
277 +    FUNC GLOBAL DEFAULT   N __pthread_unwind_next
278 +    FUNC   WEAK DEFAULT   N __pwrite64
279 +    FUNC   WEAK DEFAULT   N __read
280 +    FUNC GLOBAL DEFAULT UND __register_atfork
281 +    FUNC GLOBAL DEFAULT   N __res_state
282 +     TLS GLOBAL DEFAULT UND __resp
283 +    FUNC GLOBAL DEFAULT UND __sched_getparam
284 +    FUNC GLOBAL DEFAULT UND __sched_getscheduler
285 +    FUNC GLOBAL DEFAULT UND __sched_setscheduler
286 +    FUNC   WEAK DEFAULT   N __send
287 +    FUNC GLOBAL DEFAULT UND __setmntent
288      FUNC GLOBAL DEFAULT   N __sigaction
289 -  OBJECT GLOBAL DEFAULT   N __sighandler
290 -  NOTYPE GLOBAL DEFAULT ABS _edata
291 -  NOTYPE GLOBAL DEFAULT ABS _end
292 -    FUNC GLOBAL DEFAULT   N _fini
293 -    FUNC GLOBAL DEFAULT   N _init
294 +    FUNC GLOBAL DEFAULT UND __statfs
295 +    FUNC GLOBAL DEFAULT UND __sysconf
296 +    FUNC GLOBAL DEFAULT UND __tls_get_addr
297 +  OBJECT GLOBAL DEFAULT UND __vdso_clock_gettime
298 +    FUNC GLOBAL DEFAULT   N __vfork
299 +    FUNC   WEAK DEFAULT   N __wait
300 +    FUNC   WEAK DEFAULT   N __write
301 +    FUNC GLOBAL DEFAULT UND _dl_allocate_tls
302 +    FUNC GLOBAL DEFAULT UND _dl_allocate_tls_init
303 +    FUNC GLOBAL DEFAULT UND _dl_deallocate_tls
304 +    FUNC GLOBAL DEFAULT UND _dl_get_tls_static_info
305 +    FUNC GLOBAL DEFAULT UND _dl_make_stack_executable
306 +    FUNC GLOBAL DEFAULT UND _exit
307      FUNC GLOBAL DEFAULT   N _pthread_cleanup_pop
308      FUNC GLOBAL DEFAULT   N _pthread_cleanup_pop_restore
309      FUNC GLOBAL DEFAULT   N _pthread_cleanup_push
310      FUNC GLOBAL DEFAULT   N _pthread_cleanup_push_defer
311 -    FUNC GLOBAL DEFAULT   N compare_and_swap_is_available
312 -    FUNC GLOBAL DEFAULT   N get_eflags
313 +  OBJECT GLOBAL DEFAULT UND _rtld_global
314 +    FUNC GLOBAL DEFAULT UND _setjmp
315 +    FUNC GLOBAL DEFAULT UND abort
316 +    FUNC   WEAK DEFAULT   N accept
317 +    FUNC GLOBAL DEFAULT UND calloc
318 +    FUNC   WEAK DEFAULT   N close
319 +    FUNC   WEAK DEFAULT   N connect
320 +     TLS GLOBAL DEFAULT UND errno
321 +    FUNC GLOBAL DEFAULT UND exit
322 +    FUNC GLOBAL DEFAULT UND fclose
323 +    FUNC   WEAK DEFAULT   N fcntl
324 +    FUNC   WEAK DEFAULT   N flockfile
325 +    FUNC GLOBAL DEFAULT UND fopen
326 +    FUNC GLOBAL DEFAULT   N fork
327 +    FUNC GLOBAL DEFAULT UND free
328 +    FUNC   WEAK DEFAULT   N fsync
329 +    FUNC   WEAK DEFAULT   N ftrylockfile
330 +    FUNC   WEAK DEFAULT   N funlockfile
331 +    FUNC GLOBAL DEFAULT UND getrlimit
332 +     TLS GLOBAL DEFAULT UND h_errno
333 +    FUNC GLOBAL DEFAULT UND link
334      FUNC GLOBAL DEFAULT   N longjmp
335 +    FUNC   WEAK DEFAULT   N lseek
336 +    FUNC   WEAK DEFAULT   N lseek64
337 +    FUNC GLOBAL DEFAULT UND malloc
338 +    FUNC GLOBAL DEFAULT UND memcpy
339 +    FUNC GLOBAL DEFAULT UND mempcpy
340 +    FUNC GLOBAL DEFAULT UND memset
341 +    FUNC GLOBAL DEFAULT UND mktemp
342 +    FUNC GLOBAL DEFAULT UND mmap
343 +    FUNC GLOBAL DEFAULT UND mprotect
344 +    FUNC   WEAK DEFAULT   N msync
345 +    FUNC GLOBAL DEFAULT UND munmap
346 +    FUNC   WEAK DEFAULT   N nanosleep
347 +    FUNC   WEAK DEFAULT   N open
348 +    FUNC   WEAK DEFAULT   N open64
349 +    FUNC   WEAK DEFAULT   N pause
350 +    FUNC   WEAK DEFAULT   N pread
351 +    FUNC   WEAK DEFAULT   N pread64
352 +    FUNC GLOBAL DEFAULT   N pthread_atfork
353      FUNC GLOBAL DEFAULT   N pthread_attr_destroy
354 +    FUNC GLOBAL DEFAULT   N pthread_attr_getaffinity_np
355      FUNC GLOBAL DEFAULT   N pthread_attr_getdetachstate
356 -    FUNC   WEAK DEFAULT   N pthread_attr_getguardsize
357 +    FUNC GLOBAL DEFAULT   N pthread_attr_getguardsize
358      FUNC GLOBAL DEFAULT   N pthread_attr_getinheritsched
359      FUNC GLOBAL DEFAULT   N pthread_attr_getschedparam
360      FUNC GLOBAL DEFAULT   N pthread_attr_getschedpolicy
361      FUNC GLOBAL DEFAULT   N pthread_attr_getscope
362 -    FUNC   WEAK DEFAULT   N pthread_attr_getstack
363 -    FUNC   WEAK DEFAULT   N pthread_attr_getstacksize
364 +    FUNC GLOBAL DEFAULT   N pthread_attr_getstack
365 +    FUNC GLOBAL DEFAULT   N pthread_attr_getstackaddr
366 +    FUNC GLOBAL DEFAULT   N pthread_attr_getstacksize
367      FUNC GLOBAL DEFAULT   N pthread_attr_init
368 +    FUNC GLOBAL DEFAULT   N pthread_attr_setaffinity_np
369      FUNC GLOBAL DEFAULT   N pthread_attr_setdetachstate
370 -    FUNC   WEAK DEFAULT   N pthread_attr_setguardsize
371 +    FUNC GLOBAL DEFAULT   N pthread_attr_setguardsize
372      FUNC GLOBAL DEFAULT   N pthread_attr_setinheritsched
373      FUNC GLOBAL DEFAULT   N pthread_attr_setschedparam
374      FUNC GLOBAL DEFAULT   N pthread_attr_setschedpolicy
375      FUNC GLOBAL DEFAULT   N pthread_attr_setscope
376 -    FUNC   WEAK DEFAULT   N pthread_attr_setstack
377 -    FUNC   WEAK DEFAULT   N pthread_attr_setstacksize
378 +    FUNC GLOBAL DEFAULT   N pthread_attr_setstack
379 +    FUNC GLOBAL DEFAULT   N pthread_attr_setstackaddr
380 +    FUNC GLOBAL DEFAULT   N pthread_attr_setstacksize
381      FUNC GLOBAL DEFAULT   N pthread_barrier_destroy
382      FUNC GLOBAL DEFAULT   N pthread_barrier_init
383      FUNC GLOBAL DEFAULT   N pthread_barrier_wait
384      FUNC GLOBAL DEFAULT   N pthread_barrierattr_destroy
385 +    FUNC GLOBAL DEFAULT   N pthread_barrierattr_getpshared
386      FUNC GLOBAL DEFAULT   N pthread_barrierattr_init
387      FUNC GLOBAL DEFAULT   N pthread_barrierattr_setpshared
388      FUNC GLOBAL DEFAULT   N pthread_cancel
389 @@ -193,36 +178,49 @@
390      FUNC GLOBAL DEFAULT   N pthread_cond_timedwait
391      FUNC GLOBAL DEFAULT   N pthread_cond_wait
392      FUNC GLOBAL DEFAULT   N pthread_condattr_destroy
393 +    FUNC GLOBAL DEFAULT   N pthread_condattr_getclock
394      FUNC GLOBAL DEFAULT   N pthread_condattr_getpshared
395      FUNC GLOBAL DEFAULT   N pthread_condattr_init
396 +    FUNC GLOBAL DEFAULT   N pthread_condattr_setclock
397      FUNC GLOBAL DEFAULT   N pthread_condattr_setpshared
398      FUNC GLOBAL DEFAULT   N pthread_create
399      FUNC GLOBAL DEFAULT   N pthread_detach
400      FUNC GLOBAL DEFAULT   N pthread_equal
401      FUNC GLOBAL DEFAULT   N pthread_exit
402 +    FUNC GLOBAL DEFAULT   N pthread_getaffinity_np
403      FUNC GLOBAL DEFAULT   N pthread_getattr_np
404 -    FUNC   WEAK DEFAULT   N pthread_getconcurrency
405 +    FUNC GLOBAL DEFAULT   N pthread_getconcurrency
406 +    FUNC GLOBAL DEFAULT   N pthread_getcpuclockid
407      FUNC GLOBAL DEFAULT   N pthread_getschedparam
408      FUNC GLOBAL DEFAULT   N pthread_getspecific
409      FUNC GLOBAL DEFAULT   N pthread_join
410      FUNC GLOBAL DEFAULT   N pthread_key_create
411      FUNC GLOBAL DEFAULT   N pthread_key_delete
412      FUNC GLOBAL DEFAULT   N pthread_kill
413 -    FUNC   WEAK DEFAULT   N pthread_kill_other_threads_np
414 +    FUNC GLOBAL DEFAULT   N pthread_kill_other_threads_np
415 +    FUNC GLOBAL DEFAULT   N pthread_mutex_consistent_np
416      FUNC GLOBAL DEFAULT   N pthread_mutex_destroy
417 +    FUNC GLOBAL DEFAULT   N pthread_mutex_getprioceiling
418      FUNC GLOBAL DEFAULT   N pthread_mutex_init
419      FUNC GLOBAL DEFAULT   N pthread_mutex_lock
420 +    FUNC GLOBAL DEFAULT   N pthread_mutex_setprioceiling
421      FUNC GLOBAL DEFAULT   N pthread_mutex_timedlock
422      FUNC GLOBAL DEFAULT   N pthread_mutex_trylock
423      FUNC GLOBAL DEFAULT   N pthread_mutex_unlock
424      FUNC GLOBAL DEFAULT   N pthread_mutexattr_destroy
425      FUNC   WEAK DEFAULT   N pthread_mutexattr_getkind_np
426 -    FUNC   WEAK DEFAULT   N pthread_mutexattr_getpshared
427 -    FUNC   WEAK DEFAULT   N pthread_mutexattr_gettype
428 +    FUNC GLOBAL DEFAULT   N pthread_mutexattr_getprioceiling
429 +    FUNC GLOBAL DEFAULT   N pthread_mutexattr_getprotocol
430 +    FUNC GLOBAL DEFAULT   N pthread_mutexattr_getpshared
431 +    FUNC GLOBAL DEFAULT   N pthread_mutexattr_getrobust_np
432 +    FUNC GLOBAL DEFAULT   N pthread_mutexattr_gettype
433      FUNC GLOBAL DEFAULT   N pthread_mutexattr_init
434      FUNC   WEAK DEFAULT   N pthread_mutexattr_setkind_np
435 -    FUNC   WEAK DEFAULT   N pthread_mutexattr_setpshared
436 -    FUNC   WEAK DEFAULT   N pthread_mutexattr_settype
437 +    FUNC GLOBAL DEFAULT   N pthread_mutexattr_setprioceiling
438 +    FUNC GLOBAL DEFAULT   N pthread_mutexattr_setprotocol
439 +    FUNC GLOBAL DEFAULT   N pthread_mutexattr_setpshared
440 +    FUNC GLOBAL DEFAULT   N pthread_mutexattr_setrobust_np
441 +    FUNC GLOBAL DEFAULT   N pthread_mutexattr_settype
442      FUNC GLOBAL DEFAULT   N pthread_once
443      FUNC GLOBAL DEFAULT   N pthread_rwlock_destroy
444      FUNC GLOBAL DEFAULT   N pthread_rwlock_init
445 @@ -240,27 +238,35 @@
446      FUNC GLOBAL DEFAULT   N pthread_rwlockattr_setkind_np
447      FUNC GLOBAL DEFAULT   N pthread_rwlockattr_setpshared
448      FUNC GLOBAL DEFAULT   N pthread_self
449 +    FUNC GLOBAL DEFAULT   N pthread_setaffinity_np
450      FUNC GLOBAL DEFAULT   N pthread_setcancelstate
451      FUNC GLOBAL DEFAULT   N pthread_setcanceltype
452 -    FUNC   WEAK DEFAULT   N pthread_setconcurrency
453 -    FUNC GLOBAL DEFAULT   N pthread_setegid_np
454 -    FUNC GLOBAL DEFAULT   N pthread_seteuid_np
455 -    FUNC GLOBAL DEFAULT   N pthread_setgid_np
456 -    FUNC GLOBAL DEFAULT   N pthread_setregid_np
457 -    FUNC GLOBAL DEFAULT   N pthread_setresgid_np
458 -    FUNC GLOBAL DEFAULT   N pthread_setresuid_np
459 -    FUNC GLOBAL DEFAULT   N pthread_setreuid_np
460 +    FUNC GLOBAL DEFAULT   N pthread_setconcurrency
461      FUNC GLOBAL DEFAULT   N pthread_setschedparam
462 +    FUNC GLOBAL DEFAULT   N pthread_setschedprio
463      FUNC GLOBAL DEFAULT   N pthread_setspecific
464 -    FUNC GLOBAL DEFAULT   N pthread_setuid_np
465      FUNC GLOBAL DEFAULT   N pthread_sigmask
466 -    FUNC   WEAK DEFAULT   N pthread_spin_destroy
467 -    FUNC   WEAK DEFAULT   N pthread_spin_init
468 -    FUNC   WEAK DEFAULT   N pthread_spin_lock
469 -    FUNC   WEAK DEFAULT   N pthread_spin_trylock
470 -    FUNC   WEAK DEFAULT   N pthread_spin_unlock
471 +    FUNC GLOBAL DEFAULT   N pthread_spin_destroy
472 +    FUNC GLOBAL DEFAULT   N pthread_spin_init
473 +    FUNC GLOBAL DEFAULT   N pthread_spin_lock
474 +    FUNC GLOBAL DEFAULT   N pthread_spin_trylock
475 +    FUNC GLOBAL DEFAULT   N pthread_spin_unlock
476      FUNC GLOBAL DEFAULT   N pthread_testcancel
477 +    FUNC GLOBAL DEFAULT   N pthread_timedjoin_np
478 +    FUNC GLOBAL DEFAULT   N pthread_tryjoin_np
479 +    FUNC GLOBAL DEFAULT   N pthread_yield
480 +    FUNC   WEAK DEFAULT   N pwrite
481 +    FUNC   WEAK DEFAULT   N pwrite64
482      FUNC GLOBAL DEFAULT   N raise
483 +    FUNC   WEAK DEFAULT   N read
484 +    FUNC GLOBAL DEFAULT UND realloc
485 +    FUNC   WEAK DEFAULT   N recv
486 +    FUNC   WEAK DEFAULT   N recvfrom
487 +    FUNC   WEAK DEFAULT   N recvmsg
488 +    FUNC GLOBAL DEFAULT UND sched_get_priority_max
489 +    FUNC GLOBAL DEFAULT UND sched_get_priority_min
490 +    FUNC GLOBAL DEFAULT UND sched_setparam
491 +    FUNC GLOBAL DEFAULT UND sched_yield
492      FUNC GLOBAL DEFAULT   N sem_close
493      FUNC GLOBAL DEFAULT   N sem_destroy
494      FUNC GLOBAL DEFAULT   N sem_getvalue
495 @@ -271,8 +277,23 @@
496      FUNC GLOBAL DEFAULT   N sem_trywait
497      FUNC GLOBAL DEFAULT   N sem_unlink
498      FUNC GLOBAL DEFAULT   N sem_wait
499 -    FUNC GLOBAL DEFAULT   N set_eflags
500 -    FUNC GLOBAL DEFAULT   N sigaction
501 -    FUNC GLOBAL DEFAULT   N siglongjmp
502 -    FUNC GLOBAL DEFAULT   N sigwait
503 -    FUNC GLOBAL DEFAULT   N testandset
504 +    FUNC   WEAK DEFAULT   N send
505 +    FUNC   WEAK DEFAULT   N sendmsg
506 +    FUNC   WEAK DEFAULT   N sendto
507 +    FUNC   WEAK DEFAULT   N sigaction
508 +    FUNC   WEAK DEFAULT   N siglongjmp
509 +    FUNC   WEAK DEFAULT   N sigwait
510 +    FUNC GLOBAL DEFAULT UND sscanf
511 +    FUNC GLOBAL DEFAULT UND strcmp
512 +    FUNC GLOBAL DEFAULT UND strlen
513 +    FUNC GLOBAL DEFAULT   N system
514 +    FUNC   WEAK DEFAULT   N tcdrain
515 +    FUNC GLOBAL DEFAULT UND tdelete
516 +    FUNC GLOBAL DEFAULT UND tfind
517 +    FUNC GLOBAL DEFAULT UND tsearch
518 +    FUNC GLOBAL DEFAULT UND twalk
519 +    FUNC GLOBAL DEFAULT UND unlink
520 +    FUNC   WEAK DEFAULT   N vfork
521 +    FUNC   WEAK DEFAULT   N wait
522 +    FUNC   WEAK DEFAULT   N waitpid
523 +    FUNC   WEAK DEFAULT   N write
524
525
526 And uclibc_unrefd.lst is:
527
528 __compare_and_swap
529 __flockfilelist
530 __fresetlockfiles
531 __funlockfilelist
532 __linuxthreads_create_event
533 __linuxthreads_death_event
534 __linuxthreads_initial_report_events
535 __linuxthreads_pthread_key_2ndlevel_size
536 __linuxthreads_pthread_keys_max
537 __linuxthreads_pthread_sizeof_descr
538 __linuxthreads_pthread_threads_max
539 __linuxthreads_reap_event
540 __linuxthreads_version
541 __pthread_alt_lock
542 __pthread_alt_timedlock
543 __pthread_alt_unlock
544 __pthread_attr_destroy
545 __pthread_attr_getdetachstate
546 __pthread_attr_getguardsize
547 __pthread_attr_getinheritsched
548 __pthread_attr_getschedparam
549 __pthread_attr_getschedpolicy
550 __pthread_attr_getscope
551 __pthread_attr_getstack
552 __pthread_attr_getstacksize
553 __pthread_attr_init
554 __pthread_attr_setdetachstate
555 __pthread_attr_setguardsize
556 __pthread_attr_setinheritsched
557 __pthread_attr_setschedparam
558 __pthread_attr_setschedpolicy
559 __pthread_attr_setscope
560 __pthread_attr_setstack
561 __pthread_attr_setstacksize
562 __pthread_barrierattr_getpshared
563 __pthread_compare_and_swap
564 __pthread_cond_broadcast
565 __pthread_cond_destroy
566 __pthread_cond_init
567 __pthread_cond_signal
568 __pthread_cond_timedwait
569 __pthread_cond_wait
570 __pthread_condattr_destroy
571 __pthread_condattr_init
572 __pthread_create
573 __pthread_destroy_specifics
574 __pthread_do_exit
575 __pthread_equal
576 __pthread_exit_code
577 __pthread_exit_requested
578 __pthread_find_self
579 __pthread_functions
580 __pthread_getconcurrency
581 __pthread_getschedparam
582 __pthread_getspecific
583 __pthread_handles
584 __pthread_handles_num
585 __pthread_has_cas
586 __pthread_init_max_stacksize
587 __pthread_initial_thread
588 __pthread_initial_thread_bos
589 __pthread_initialize_manager
590 __pthread_internal_tsd_address
591 __pthread_internal_tsd_get
592 __pthread_internal_tsd_set
593 __pthread_key_create
594 __pthread_kill_other_threads_np
595 __pthread_last_event
596 __pthread_lock
597 __pthread_main_thread
598 __pthread_manager
599 __pthread_manager_adjust_prio
600 __pthread_manager_event
601 __pthread_manager_reader
602 __pthread_manager_request
603 __pthread_manager_sighandler
604 __pthread_manager_thread
605 __pthread_manager_thread_bos
606 __pthread_manager_thread_tos
607 __pthread_max_stacksize
608 __pthread_mutex_destroy
609 __pthread_mutex_timedlock
610 __pthread_mutexattr_destroy
611 __pthread_mutexattr_getkind_np
612 __pthread_mutexattr_getpshared
613 __pthread_mutexattr_gettype
614 __pthread_mutexattr_init
615 __pthread_mutexattr_setkind_np
616 __pthread_mutexattr_setpshared
617 __pthread_mutexattr_settype
618 __pthread_nonstandard_stacks
619 __pthread_null_sighandler
620 __pthread_offsetof_descr
621 __pthread_offsetof_pid
622 __pthread_once_fork_child
623 __pthread_once_fork_parent
624 __pthread_once_fork_prepare
625 __pthread_perform_cleanup
626 __pthread_raise
627 __pthread_reset_main_thread
628 __pthread_restart_new
629 __pthread_rwlock_destroy
630 __pthread_rwlock_init
631 __pthread_rwlock_rdlock
632 __pthread_rwlock_timedrdlock
633 __pthread_rwlock_timedwrlock
634 __pthread_rwlock_tryrdlock
635 __pthread_rwlock_trywrlock
636 __pthread_rwlock_unlock
637 __pthread_rwlock_wrlock
638 __pthread_rwlockattr_destroy
639 __pthread_self
640 __pthread_setcancelstate
641 __pthread_setcanceltype
642 __pthread_setconcurrency
643 __pthread_setschedparam
644 __pthread_setspecific
645 __pthread_sig_cancel
646 __pthread_sig_debug
647 __pthread_sig_restart
648 __pthread_sigaction
649 __pthread_sighandler
650 __pthread_sighandler_rt
651 __pthread_sigwait
652 __pthread_sizeof_handle
653 __pthread_smp_kernel
654 __pthread_spin_destroy
655 __pthread_spin_init
656 __pthread_spin_lock
657 __pthread_spin_trylock
658 __pthread_spin_unlock
659 __pthread_thread_self
660 __pthread_threads_debug
661 __pthread_threads_events
662 __pthread_threads_max
663 __pthread_timedsuspend_new
664 __pthread_unlock
665 __pthread_wait_for_restart_signal
666 __register_atfork
667 __sigaction
668 __sighandler
669 compare_and_swap_is_available
670 get_eflags
671 pthread_attr_getguardsize
672 pthread_attr_getstack
673 pthread_attr_getstacksize
674 pthread_attr_setguardsize
675 pthread_attr_setstack
676 pthread_attr_setstacksize
677 pthread_barrier_destroy
678 pthread_barrier_init
679 pthread_barrier_wait
680 pthread_barrierattr_destroy
681 pthread_barrierattr_init
682 pthread_barrierattr_setpshared
683 pthread_cancel
684 pthread_condattr_getpshared
685 pthread_condattr_setpshared
686 pthread_create
687 pthread_detach
688 pthread_getattr_np
689 pthread_getconcurrency
690 pthread_getspecific
691 pthread_join
692 pthread_key_create
693 pthread_key_delete
694 pthread_kill
695 pthread_kill_other_threads_np
696 pthread_mutex_timedlock
697 pthread_mutexattr_destroy
698 pthread_mutexattr_getkind_np
699 pthread_mutexattr_getpshared
700 pthread_mutexattr_gettype
701 pthread_mutexattr_init
702 pthread_mutexattr_setkind_np
703 pthread_mutexattr_setpshared
704 pthread_mutexattr_settype
705 pthread_rwlock_destroy
706 pthread_rwlock_init
707 pthread_rwlock_rdlock
708 pthread_rwlock_timedrdlock
709 pthread_rwlock_timedwrlock
710 pthread_rwlock_tryrdlock
711 pthread_rwlock_trywrlock
712 pthread_rwlock_unlock
713 pthread_rwlock_wrlock
714 pthread_rwlockattr_destroy
715 pthread_rwlockattr_getkind_np
716 pthread_rwlockattr_getpshared
717 pthread_rwlockattr_init
718 pthread_rwlockattr_setkind_np
719 pthread_rwlockattr_setpshared
720 pthread_setconcurrency
721 pthread_setegid_np
722 pthread_seteuid_np
723 pthread_setgid_np
724 pthread_setregid_np
725 pthread_setresgid_np
726 pthread_setresuid_np
727 pthread_setreuid_np
728 pthread_setspecific
729 pthread_setuid_np
730 pthread_sigmask
731 pthread_spin_destroy
732 pthread_spin_init
733 pthread_spin_lock
734 pthread_spin_trylock
735 pthread_spin_unlock
736 pthread_testcancel
737 sem_close
738 sem_destroy
739 sem_getvalue
740 sem_init
741 sem_open
742 sem_post
743 sem_timedwait
744 sem_trywait
745 sem_unlink
746 sem_wait
747 set_eflags
748 testandset