* libc.so symbols that are not reserved
@ 2013-11-12 1:39 Szabolcs Nagy
2013-11-12 2:55 ` Rich Felker
0 siblings, 1 reply; 4+ messages in thread
From: Szabolcs Nagy @ 2013-11-12 1:39 UTC (permalink / raw)
To: musl
i filtered nm -D libc.so for posix name space violations
and compared the results (weak symbols were omitted), some
of these should be fixed
(for glibc i used c, m, dl, crypt, resolv, util, pthread and rt
i have an old glibc so it might not be representative)
diff -u glibc musl
(so -glibc +musl and the rest are common errors)
-B argp_program_bug_address
-B argp_program_version
-B argp_program_version_hook
-B error_message_count
-B error_one_per_line
-B error_print_progname
-B loc1
-B loc2
-B locs
-B mallwatch
-B rexecoptions
-B rpc_createerr
-B svc_fdset
-B svc_max_pollfd
-B svc_pollfd
-B svcauthdes_stats
-D argp_err_exit_status
-D obstack_alloc_failed_handler
-D obstack_exit_failure
D stderr
D stdin
D stdout
-D sys_errlist
-D sys_sigabbrev
-D sys_siglist
-R sys_nerr
+T accept4
T acct
-T addseverity
-T alphasort64
-T argz_delete
-T authdes_create
-T authdes_getucred
-T authdes_pk_create
-T authnone_create
-T authunix_create
-T authunix_create_default
+T addmntent
+T adjtime
+T adjtimex
+T aligned_alloc
+T asprintf
+T at_quick_exit
+T bcmp
T bcopy
-T bdflush
-T bindresvport
-T callrpc
+T bind_textdomain_codeset
+T bindtextdomain
+T brk
+T bzero
T capget
T capset
-T cbc_crypt
T cfmakeraw
-T cfsetspeed
-T chflags
T chroot
-T clearerr_unlocked
-T clnt_broadcast
-T clnt_create
-T clnt_pcreateerror
-T clnt_perrno
-T clnt_perror
-T clnt_spcreateerror
-T clnt_sperrno
-T clnt_sperror
-T clntraw_create
-T clnttcp_create
-T clntudp_bufcreate
-T clntudp_create
-T clntunix_create
-T creat64
-T create_module
+T clearenv
T cuserid
T daemon
+T dcgettext
+T dcngettext
T delete_module
-T des_setparity
+T dgettext
+T dl_iterate_phdr
T dladdr
-T dladdr1
T dlinfo
-T dlmopen
-T drand48_r
-T dup3
-T dysize
-T ecb_crypt
+T dn_skipname
+T dngettext
T ecvt
-T ecvt_r
-T endaliasent
-T endfsent
-T endnetgrent
-T endrpcent
-T endsgent
+T endmntent
T endspent
-T endttyent
T endusershell
-T envz_add
-T envz_entry
-T envz_get
-T envz_merge
-T envz_remove
-T envz_strip
T epoll_create
T epoll_create1
T epoll_ctl
T epoll_pwait
T epoll_wait
T err
T errx
T ether_aton
T ether_aton_r
T ether_hostton
T ether_line
T ether_ntoa
T ether_ntoa_r
T ether_ntohost
+T euidaccess
T eventfd
T eventfd_read
T eventfd_write
+T exp10
+T exp10f
+T exp10l
T fallocate
-T fallocate64
-T fattach
-T fchflags
T fcvt
-T fcvt_r
-T fdetach
-T fedisableexcept
-T feenableexcept
-T fegetexcept
-T feof_unlocked
-T ferror_unlocked
-T fflush_unlocked
-T ffsll
T fgetgrent
-T fgetpos64
+T fgetln
T fgetpwent
-T fgets_unlocked
-T fgetsgent
T fgetspent
-T fgetws_unlocked
T fgetxattr
T flistxattr
-T fopencookie
+T flock
T forkpty
-T fputc_unlocked
-T fputs_unlocked
-T fputwc_unlocked
-T fputws_unlocked
-T fread_unlocked
T freeifaddrs
T fremovexattr
-T freopen64
-T fseeko64
-T fsetpos64
T fsetxattr
-T ftello64
T ftime
-T fts_children
-T fts_close
-T fts_open
-T fts_read
-T fts_set
-T ftw64
+T futimes
T futimesat
-T fwrite_unlocked
T gcvt
T get_current_dir_name
-T get_kernel_syms
-T get_myaddress
-T getaliasbyname
-T getaliasbyname_r
-T getaliasent
-T getaliasent_r
-T getdirentries
-T getdirentries64
T getdomainname
-T getfsent
-T getfsfile
-T getfsspec
-T getgrent_r
+T getdtablesize
T getgrouplist
T gethostbyaddr
T gethostbyaddr_r
T gethostbyname
T gethostbyname2
T gethostbyname2_r
T gethostbyname_r
-T gethostent_r
T getifaddrs
-T getipv4sourcefilter
-T getloadavg
T getmntent
-T getmsg
-T getnetbyaddr_r
-T getnetbyname_r
-T getnetent_r
-T getnetgrent
-T getnetname
+T getmntent_r
T getopt_long
T getopt_long_only
+T getpagesize
T getpass
-T getpmsg
-T getprotobyname_r
-T getprotobynumber_r
-T getprotoent_r
-T getpublickey
-T getpwent_r
-T getrlimit64
-T getrpcbyname
-T getrpcbyname_r
-T getrpcbynumber
-T getrpcbynumber_r
-T getrpcent
-T getrpcent_r
-T getrpcport
-T getsecretkey
+T getresgid
+T getresuid
T getservbyname_r
T getservbyport_r
-T getservent_r
-T getsgent
-T getsgent_r
-T getsgnam
-T getsgnam_r
-T getsourcefilter
T getspent
-T getspent_r
T getspnam
T getspnam_r
-T getttyent
-T getttynam
+T gettext
T getusershell
-T getutmp
-T getutmpx
T getw
-T getwchar_unlocked
-T getwd
T getxattr
-T glob64
-T globfree64
-T gnu_dev_major
-T gnu_dev_makedev
-T gnu_dev_minor
-T gtty
-T hcreate_r
-T hdestroy_r
-T herror
-T host2netname
-T hsearch_r
+T hasmntopt
T hstrerror
-T inet6_opt_append
-T inet6_opt_find
-T inet6_opt_finish
-T inet6_opt_get_val
-T inet6_opt_init
-T inet6_opt_next
-T inet6_opt_set_val
-T inet6_option_alloc
-T inet6_option_append
-T inet6_option_find
-T inet6_option_init
-T inet6_option_next
-T inet6_option_space
-T inet6_rth_add
-T inet6_rth_getaddr
-T inet6_rth_init
-T inet6_rth_reverse
-T inet6_rth_segments
-T inet6_rth_space
+T index
T init_module
T initgroups
-T innetgr
T inotify_add_watch
T inotify_init
T inotify_init1
T inotify_rm_watch
+T ioctl
T ioperm
T iopl
-T iruserok
-T iruserok_af
T j0f
T j1f
T jnf
-T key_decryptsession
-T key_decryptsession_pk
-T key_encryptsession
-T key_encryptsession_pk
-T key_gendes
-T key_get_conv
-T key_secretkey_is_set
-T key_setnet
-T key_setsecret
T klogctl
T lchmod
+T lckpwdf
T lgetxattr
T listxattr
T llistxattr
-T lockf64
-T login
-T login_tty
-T logout
-T logwtmp
-T lrand48_r
T lremovexattr
T lsetxattr
T lutimes
-T madvise
-T malloc_info
-T mcheck
-T mcheck_check_all
-T mcheck_pedantic
T mincore
T mkostemp
-T mkostemp64
-T mkostemps
-T mkostemps64
-T mkstemp64
T mkstemps
-T mkstemps64
T mktemp
-T mprobe
-T mrand48_r
-T mtrace
-T muntrace
-T netname2host
-T netname2user
-T nfsservctl
-T nftw64
-T ns_datetosecs
-T ns_format_ttl
-T ns_get16
-T ns_get32
-T ns_initparse
-T ns_makecanon
-T ns_msg_getflag
-T ns_name_compress
-T ns_name_ntol
-T ns_name_ntop
-T ns_name_pack
-T ns_name_pton
-T ns_name_rollback
-T ns_name_skip
-T ns_name_uncompress
-T ns_name_unpack
-T ns_parse_ttl
-T ns_parserr
-T ns_put16
-T ns_put32
-T ns_samedomain
-T ns_samename
-T ns_skiprr
-T ns_sprintrr
-T ns_sprintrrf
-T ns_subdomain
-T ntp_gettime
-T obstack_free
+T mount
+T ngettext
T openpty
-T parse_printf_format
-T passwd2des
+T personality
+T pipe2
T pivot_root
-T pmap_getmaps
-T pmap_getport
-T pmap_rmtcall
-T pmap_set
-T pmap_unset
T ppoll
+T prctl
T preadv
-T preadv64
-T printf_size
-T printf_size_info
+T prlimit
+T process_vm_readv
+T process_vm_writev
T ptrace
T putgrent
-T putmsg
-T putpmsg
T putpwent
-T putsgent
T putspent
T putw
-T putwc_unlocked
-T putwchar_unlocked
T pwritev
-T pwritev64
-T qecvt
-T qecvt_r
-T qfcvt
-T qfcvt_r
-T qgcvt
-T qsort_r
-T query_module
T quick_exit
-T quotactl
-T rcmd
-T rcmd_af
-T readdir64
-T readdir64_r
+T readahead
T reboot
-T registerrpc
+T remap_file_pages
T removexattr
-T res_gethostbyaddr
-T res_gethostbyname
-T res_gethostbyname2
-T res_send_setqhook
-T res_send_setrhook
-T revoke
-T rexec
-T rexec_af
-T rpmatch
-T rresvport
-T rresvport_af
-T rtime
-T ruserok
-T ruserok_af
-T ruserpass
-T scandir64
+T res_init
+T res_query
+T rindex
+T sbrk
+T scalb
+T scalbf
T sendfile
-T sendfile64
-T setaliasent
+T setbuffer
T setdomainname
-T setfsent
T setfsgid
T setfsuid
T setgroups
-T sethostid
T sethostname
-T setipv4sourcefilter
T setlinebuf
-T setlogin
-T setnetgrent
-T setrlimit64
-T setrpcent
-T setsgent
-T setsourcefilter
+T setmntent
+T setns
+T setresgid
+T setresuid
T setspent
-T setttyent
+T settimeofday
T setusershell
T setxattr
-T sgetsgent
-T sgetspent
T sigandset
-T siggetmask
T sigisemptyset
T signalfd
+T significand
+T significandf
T sigorset
-T sigstack
+T sincos
+T sincosf
+T sincosl
T splice
-T sstk
T stime
-T stty
-T svc_exit
-T svc_getreq
-T svc_getreq_common
-T svc_getreq_poll
-T svc_getreqset
-T svc_register
-T svc_run
-T svc_sendreply
-T svc_unregister
-T svcerr_auth
-T svcerr_decode
-T svcerr_noproc
-T svcerr_noprog
-T svcerr_progvers
-T svcerr_systemerr
-T svcerr_weakauth
-T svcfd_create
-T svcraw_create
-T svctcp_create
-T svcudp_bufcreate
-T svcudp_create
-T svcudp_enablecache
-T svcunix_create
-T svcunixfd_create
+T swapoff
+T swapon
T sync_file_range
+T syncfs
T syscall
T sysinfo
+T tdestroy
T tee
+T textdomain
T timegm
T timerfd_create
T timerfd_gettime
T timerfd_settime
-T tmpfile64
-T tmpnam_r
-T tr_break
-T truncate64
-T ttyslot
T ualarm
+T ulckpwdf
+T umount
+T umount2
T unshare
T updwtmpx
-T uselib
-T user2netname
T usleep
-T ustat
-T utmpxname
+T valloc
+T vasprintf
T verr
T verrx
T versionsort
-T versionsort64
T vhangup
-T vlimit
-T vm86
T vmsplice
-T vsyslog
-T vtimes
T vwarn
T vwarnx
+T wait3
+T wait4
T warn
T warnx
-T xdecrypt
-T xdr_accepted_reply
-T xdr_array
-T xdr_authdes_cred
-T xdr_authdes_verf
-T xdr_authunix_parms
-T xdr_bool
-T xdr_bytes
-T xdr_callhdr
-T xdr_callmsg
-T xdr_char
-T xdr_cryptkeyarg
-T xdr_cryptkeyarg2
-T xdr_cryptkeyres
-T xdr_des_block
-T xdr_double
-T xdr_enum
-T xdr_float
-T xdr_free
-T xdr_getcredres
-T xdr_hyper
-T xdr_int
-T xdr_key_netstarg
-T xdr_key_netstres
-T xdr_keybuf
-T xdr_keystatus
-T xdr_long
-T xdr_netnamestr
-T xdr_netobj
-T xdr_opaque
-T xdr_opaque_auth
-T xdr_pmap
-T xdr_pmaplist
-T xdr_pointer
-T xdr_reference
-T xdr_rejected_reply
-T xdr_replymsg
-T xdr_rmtcall_args
-T xdr_rmtcallres
-T xdr_short
-T xdr_sizeof
-T xdr_string
-T xdr_u_char
-T xdr_u_hyper
-T xdr_u_int
-T xdr_u_long
-T xdr_u_short
-T xdr_union
-T xdr_unixcred
-T xdr_vector
-T xdr_void
-T xdr_wrapstring
-T xdrmem_create
-T xdrrec_create
-T xdrrec_endofrecord
-T xdrrec_eof
-T xdrrec_skiprecord
-T xdrstdio_create
-T xencrypt
-T xprt_register
-T xprt_unregister
T y0f
T y1f
T ynf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libc.so symbols that are not reserved
2013-11-12 1:39 libc.so symbols that are not reserved Szabolcs Nagy
@ 2013-11-12 2:55 ` Rich Felker
2013-11-12 4:07 ` Szabolcs Nagy
0 siblings, 1 reply; 4+ messages in thread
From: Rich Felker @ 2013-11-12 2:55 UTC (permalink / raw)
To: musl
On Tue, Nov 12, 2013 at 02:39:47AM +0100, Szabolcs Nagy wrote:
> i filtered nm -D libc.so for posix name space violations
> and compared the results (weak symbols were omitted), some
> of these should be fixed
I'm unclear on why you consider them violations. They do not conflict
with symbols in the application or in third-party libraries. This can
easily be verified. Basically, symbols in shared libraries always act
like weak symbols would in static linking (this may be a poor
approximation of the reality, but it's close enough to be a useful way
of thinking about it).
What would in principle be problematic is if standard C or POSIX
functions in libc depended on any of these symbols, since an
application could interpose unrelated functionality with the same
name. In practice that doesn't matter for dynamic linking since
-Bsymbolic is used, but it would matter for static linking of course.
As far as I know musl has no such issues (except for treating dup3,
pipe2, etc. as if they were in POSIX since they will be in the next
issue; if you object to that I'm not opposed to adding __-prefixed
versions).
Rich
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libc.so symbols that are not reserved
2013-11-12 2:55 ` Rich Felker
@ 2013-11-12 4:07 ` Szabolcs Nagy
2013-11-12 4:41 ` Rich Felker
0 siblings, 1 reply; 4+ messages in thread
From: Szabolcs Nagy @ 2013-11-12 4:07 UTC (permalink / raw)
To: musl
* Rich Felker <dalias@aerifal.cx> [2013-11-11 21:55:40 -0500]:
> On Tue, Nov 12, 2013 at 02:39:47AM +0100, Szabolcs Nagy wrote:
> > i filtered nm -D libc.so for posix name space violations
> > and compared the results (weak symbols were omitted), some
> > of these should be fixed
>
> I'm unclear on why you consider them violations. They do not conflict
> with symbols in the application or in third-party libraries. This can
> easily be verified. Basically, symbols in shared libraries always act
> like weak symbols would in static linking (this may be a poor
> approximation of the reality, but it's close enough to be a useful way
> of thinking about it).
ok i didnt think it through
> What would in principle be problematic is if standard C or POSIX
> functions in libc depended on any of these symbols, since an
> application could interpose unrelated functionality with the same
> name. In practice that doesn't matter for dynamic linking since
> -Bsymbolic is used, but it would matter for static linking of course.
> As far as I know musl has no such issues (except for treating dup3,
> pipe2, etc. as if they were in POSIX since they will be in the next
> issue; if you object to that I'm not opposed to adding __-prefixed
> versions).
actually dup3 is __ prefixed already
so the only exceptions are
pipe2
stdin
stdout
stderr
getservbyname_r
getservbyport_r
if pipe2 and dup3 are in the next standard then i dont think
they have to be weak
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libc.so symbols that are not reserved
2013-11-12 4:07 ` Szabolcs Nagy
@ 2013-11-12 4:41 ` Rich Felker
0 siblings, 0 replies; 4+ messages in thread
From: Rich Felker @ 2013-11-12 4:41 UTC (permalink / raw)
To: musl
On Tue, Nov 12, 2013 at 05:07:36AM +0100, Szabolcs Nagy wrote:
> > What would in principle be problematic is if standard C or POSIX
> > functions in libc depended on any of these symbols, since an
> > application could interpose unrelated functionality with the same
> > name. In practice that doesn't matter for dynamic linking since
> > -Bsymbolic is used, but it would matter for static linking of course.
> > As far as I know musl has no such issues (except for treating dup3,
> > pipe2, etc. as if they were in POSIX since they will be in the next
> > issue; if you object to that I'm not opposed to adding __-prefixed
> > versions).
>
> actually dup3 is __ prefixed already
Interesting...wonder why I did that one but not pipe2...?
> so the only exceptions are
>
> pipe2
Known.
> stdin
> stdout
> stderr
Pending interpretation from WG14. :-)
> getservbyname_r
> getservbyport_r
Indeed. I must have been mistakenly thinking getservbyname and
getservbyport were obsolete already, but they're not even marked
obsolescent, despite getaddrinfo and getnameinfo offering replacement
functionality that's actually thread-safe and clean. The failure to
shade these functions [OB] perhaps should be reported as a bug against
POSIX.
> if pipe2 and dup3 are in the next standard then i dont think
> they have to be weak
Yeah, I'm fairly indifferent on it too, but I'll change them if anyone
complains.
Rich
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-12 4:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-12 1:39 libc.so symbols that are not reserved Szabolcs Nagy
2013-11-12 2:55 ` Rich Felker
2013-11-12 4:07 ` Szabolcs Nagy
2013-11-12 4:41 ` Rich Felker
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).