mailing list of musl libc
 help / color / mirror / code / Atom feed
* c++ abi
@ 2014-09-09  1:04 Szabolcs Nagy
  2014-09-09 11:43 ` Szabolcs Nagy
  0 siblings, 1 reply; 3+ messages in thread
From: Szabolcs Nagy @ 2014-09-09  1:04 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

for each type T i defined a function

 void x_T(T *x, size (*)[sizeof(T)], align (*)[alignof(T)]){}

(with some 'size' and 'align' struct types for readability)

so the mangled symbols in the c++ compiled object have the
abi info for each T that can be compared glibc vs musl

 nm abi.o |sed -n 's/^[[:xdigit:]]* T //p' |c++filt

unfortunately i only have the old musl cross compilers
(musl 1.1.2) and for glibc only gcc-4.4 cross compilers
(which only have __alignof__ instead of alignof) but some
of the findings may be relevant

[-- Attachment #2: arm.abi.diff --]
[-- Type: text/x-diff, Size: 1817 bytes --]

--- arm.glibc.abi	2014-09-09 02:34:28.618375521 +0200
+++ arm.musl.abi	2014-09-09 02:34:29.726381013 +0200
@@ -54 +54 @@
-x___jmp_buf(int*, size (*) [256], align (*) [8])
+x___jmp_buf(unsigned long long*, size (*) [256], align (*) [8])
@@ -60,2 +60,2 @@
-x_fexcept_t(unsigned int, size (*) [4], align (*) [4])
-x_gregset_t(unsigned long*, size (*) [72], align (*) [4])
+x_fexcept_t(unsigned long, size (*) [4], align (*) [4])
+x_gregset_t(int*, size (*) [72], align (*) [4])
@@ -82 +82 @@
-x_siginfo_t(siginfo, size (*) [128], align (*) [4])
+x_siginfo_t(siginfo_t, size (*) [128], align (*) [4])
@@ -115 +115 @@
-x_crypt_data(crypt_data, size (*) [131228], align (*) [4])
+x_crypt_data(crypt_data, size (*) [260], align (*) [4])
@@ -161 +161 @@
-x_sched_param(sched_param, size (*) [4], align (*) [4])
+x_sched_param(sched_param, size (*) [28], align (*) [4])
@@ -184 +184 @@
-x_ether_header(ether_header, size (*) [14], align (*) [1])
+x_ether_header(ether_header, size (*) [14], align (*) [2])
@@ -237 +237 @@
-x_pthread_cond_t(pthread_cond_t, size (*) [48], align (*) [8])
+x_pthread_cond_t(pthread_cond_t, size (*) [48], align (*) [4])
@@ -273 +273 @@
-x_CODE(_code, size (*) [8], align (*) [4])
+x_CODE(CODE, size (*) [8], align (*) [4])
@@ -331 +331 @@
-x_ethhdr(ethhdr, size (*) [14], align (*) [1])
+x_ethhdr(ethhdr, size (*) [14], align (*) [2])
@@ -358 +358 @@
-x_rusage(rusage, size (*) [72], align (*) [4])
+x_rusage(rusage, size (*) [136], align (*) [4])
@@ -377 +377 @@
-x_fd_mask(long, size (*) [4], align (*) [4])
+x_fd_mask(unsigned long, size (*) [4], align (*) [4])
@@ -419 +419 @@
-x_sysinfo(sysinfo, size (*) [64], align (*) [4])
+x_sysinfo(sysinfo, size (*) [312], align (*) [4])
@@ -421 +421 @@
-x_tftphdr(tftphdr, size (*) [5], align (*) [1])
+x_tftphdr(tftphdr, size (*) [6], align (*) [2])

[-- Attachment #3: i386.abi.diff --]
[-- Type: text/x-diff, Size: 1686 bytes --]

--- i386.glibc.abi	2014-09-09 01:49:04.876869217 +0200
+++ i386.musl.abi	2014-09-09 01:49:05.912874355 +0200
@@ -54 +54 @@
-x___jmp_buf(int*, size (*) [24], align (*) [4])
+x___jmp_buf(unsigned long*, size (*) [24], align (*) [4])
@@ -82 +82 @@
-x_siginfo_t(siginfo, size (*) [128], align (*) [4])
+x_siginfo_t(siginfo_t, size (*) [128], align (*) [4])
@@ -115 +115 @@
-x_crypt_data(crypt_data, size (*) [131228], align (*) [4])
+x_crypt_data(crypt_data, size (*) [260], align (*) [4])
@@ -120 +120 @@
-x_fpregset_t(_libc_fpstate*, size (*) [4], align (*) [4])
+x_fpregset_t(_fpstate*, size (*) [4], align (*) [4])
@@ -129 +129 @@
-x_ntptimeval(ntptimeval, size (*) [36], align (*) [4])
+x_ntptimeval(ntptimeval, size (*) [16], align (*) [4])
@@ -162 +162 @@
-x_sched_param(sched_param, size (*) [4], align (*) [4])
+x_sched_param(sched_param, size (*) [28], align (*) [4])
@@ -185 +185 @@
-x_ether_header(ether_header, size (*) [14], align (*) [1])
+x_ether_header(ether_header, size (*) [14], align (*) [2])
@@ -278 +278 @@
-x_CODE(_code, size (*) [8], align (*) [4])
+x_CODE(CODE, size (*) [8], align (*) [4])
@@ -336 +336 @@
-x_ethhdr(ethhdr, size (*) [14], align (*) [1])
+x_ethhdr(ethhdr, size (*) [14], align (*) [2])
@@ -363 +363 @@
-x_rusage(rusage, size (*) [72], align (*) [4])
+x_rusage(rusage, size (*) [136], align (*) [4])
@@ -382 +382 @@
-x_fd_mask(long, size (*) [4], align (*) [4])
+x_fd_mask(unsigned long, size (*) [4], align (*) [4])
@@ -424 +424 @@
-x_sysinfo(sysinfo, size (*) [64], align (*) [4])
+x_sysinfo(sysinfo, size (*) [312], align (*) [4])
@@ -426 +426 @@
-x_tftphdr(tftphdr, size (*) [5], align (*) [1])
+x_tftphdr(tftphdr, size (*) [6], align (*) [2])

[-- Attachment #4: mips.abi.diff --]
[-- Type: text/x-diff, Size: 2073 bytes --]

--- mips.glibc.abi	2014-09-09 02:39:58.052009103 +0200
+++ mips.musl.abi	2014-09-09 02:39:58.952013560 +0200
@@ -54 +54 @@
-x___jmp_buf(__jmp_buf_internal_tag*, size (*) [104], align (*) [8])
+x___jmp_buf(unsigned long long*, size (*) [104], align (*) [8])
@@ -81,2 +81,2 @@
-x_sigaction(sigaction, size (*) [144], align (*) [4])
-x_siginfo_t(siginfo, size (*) [128], align (*) [4])
+x_sigaction(sigaction, size (*) [140], align (*) [4])
+x_siginfo_t(siginfo_t, size (*) [128], align (*) [4])
@@ -115 +115 @@
-x_crypt_data(crypt_data, size (*) [131228], align (*) [4])
+x_crypt_data(crypt_data, size (*) [260], align (*) [4])
@@ -129 +129 @@
-x_prpsinfo_t(elf_prpsinfo, size (*) [128], align (*) [4])
+x_prpsinfo_t(elf_prpsinfo, size (*) [124], align (*) [4])
@@ -161 +161 @@
-x_sched_param(sched_param, size (*) [4], align (*) [4])
+x_sched_param(sched_param, size (*) [28], align (*) [4])
@@ -181 +181 @@
-x_elf_prpsinfo(elf_prpsinfo, size (*) [128], align (*) [4])
+x_elf_prpsinfo(elf_prpsinfo, size (*) [124], align (*) [4])
@@ -184 +184 @@
-x_ether_header(ether_header, size (*) [14], align (*) [1])
+x_ether_header(ether_header, size (*) [14], align (*) [2])
@@ -237 +237 @@
-x_pthread_cond_t(pthread_cond_t, size (*) [48], align (*) [8])
+x_pthread_cond_t(pthread_cond_t, size (*) [48], align (*) [4])
@@ -273 +273 @@
-x_CODE(_code, size (*) [8], align (*) [4])
+x_CODE(CODE, size (*) [8], align (*) [4])
@@ -331 +331 @@
-x_ethhdr(ethhdr, size (*) [14], align (*) [1])
+x_ethhdr(ethhdr, size (*) [14], align (*) [2])
@@ -357 +357 @@
-x_rusage(rusage, size (*) [72], align (*) [4])
+x_rusage(rusage, size (*) [136], align (*) [4])
@@ -376 +376 @@
-x_fd_mask(long, size (*) [4], align (*) [4])
+x_fd_mask(unsigned long, size (*) [4], align (*) [4])
@@ -418,3 +418,3 @@
-x_sysinfo(sysinfo, size (*) [64], align (*) [4])
-x_termios(termios, size (*) [52], align (*) [4])
-x_tftphdr(tftphdr, size (*) [5], align (*) [1])
+x_sysinfo(sysinfo, size (*) [312], align (*) [4])
+x_termios(termios, size (*) [60], align (*) [4])
+x_tftphdr(tftphdr, size (*) [6], align (*) [2])

[-- Attachment #5: powerpc.abi.diff --]
[-- Type: text/x-diff, Size: 2825 bytes --]

--- powerpc.glibc.abi	2014-09-09 02:36:16.450910234 +0200
+++ powerpc.musl.abi	2014-09-09 02:36:17.018913058 +0200
@@ -13 +13 @@
-x_ipc_perm(ipc_perm, size (*) [48], align (*) [8])
+x_ipc_perm(ipc_perm, size (*) [36], align (*) [4])
@@ -17 +17 @@
-x_msqid_ds(msqid_ds, size (*) [104], align (*) [8])
+x_msqid_ds(msqid_ds, size (*) [88], align (*) [4])
@@ -23 +23 @@
-x_semid_ds(semid_ds, size (*) [80], align (*) [8])
+x_semid_ds(semid_ds, size (*) [64], align (*) [4])
@@ -27 +27 @@
-x_shmid_ds(shmid_ds, size (*) [104], align (*) [8])
+x_shmid_ds(shmid_ds, size (*) [84], align (*) [4])
@@ -54 +54 @@
-x___jmp_buf(long*, size (*) [448], align (*) [16])
+x___jmp_buf(unsigned long long*, size (*) [448], align (*) [8])
@@ -82 +82 @@
-x_siginfo_t(siginfo, size (*) [128], align (*) [4])
+x_siginfo_t(siginfo_t, size (*) [128], align (*) [4])
@@ -115 +115 @@
-x_crypt_data(crypt_data, size (*) [131228], align (*) [4])
+x_crypt_data(crypt_data, size (*) [260], align (*) [4])
@@ -137 +137 @@
-x_sigjmp_buf(__jmp_buf_tag*, size (*) [592], align (*) [16])
+x_sigjmp_buf(__jmp_buf_tag*, size (*) [584], align (*) [8])
@@ -139 +139 @@
-x_ucontext_t(ucontext, size (*) [1184], align (*) [4])
+x_ucontext_t(ucontext, size (*) [1184], align (*) [16])
@@ -155 +155 @@
-x_long_double(__float128, size (*) [16], align (*) [16])
+x_long_double(long double, size (*) [8], align (*) [8])
@@ -161 +161 @@
-x_sched_param(sched_param, size (*) [4], align (*) [4])
+x_sched_param(sched_param, size (*) [28], align (*) [4])
@@ -184 +184 @@
-x_ether_header(ether_header, size (*) [14], align (*) [1])
+x_ether_header(ether_header, size (*) [14], align (*) [2])
@@ -215 +215 @@
-x___jmp_buf_tag(__jmp_buf_tag, size (*) [592], align (*) [16])
+x___jmp_buf_tag(__jmp_buf_tag, size (*) [584], align (*) [8])
@@ -237 +237 @@
-x_pthread_cond_t(pthread_cond_t, size (*) [48], align (*) [8])
+x_pthread_cond_t(pthread_cond_t, size (*) [48], align (*) [4])
@@ -273 +273 @@
-x_CODE(_code, size (*) [8], align (*) [4])
+x_CODE(CODE, size (*) [8], align (*) [4])
@@ -331 +331 @@
-x_ethhdr(ethhdr, size (*) [14], align (*) [1])
+x_ethhdr(ethhdr, size (*) [14], align (*) [2])
@@ -357 +357 @@
-x_rusage(rusage, size (*) [72], align (*) [4])
+x_rusage(rusage, size (*) [136], align (*) [4])
@@ -376 +376 @@
-x_fd_mask(long, size (*) [4], align (*) [4])
+x_fd_mask(unsigned long, size (*) [4], align (*) [4])
@@ -392 +392 @@
-x_jmp_buf(__jmp_buf_tag*, size (*) [592], align (*) [16])
+x_jmp_buf(__jmp_buf_tag*, size (*) [584], align (*) [8])
@@ -418,3 +418,3 @@
-x_sysinfo(sysinfo, size (*) [64], align (*) [4])
-x_termios(termios, size (*) [60], align (*) [4])
-x_tftphdr(tftphdr, size (*) [5], align (*) [1])
+x_sysinfo(sysinfo, size (*) [312], align (*) [4])
+x_termios(termios, size (*) [44], align (*) [4])
+x_tftphdr(tftphdr, size (*) [6], align (*) [2])

[-- Attachment #6: x86_64.abi.diff --]
[-- Type: text/x-diff, Size: 4029 bytes --]

--- x86_64.glibc.abi	2014-09-09 01:40:22.210277471 +0200
+++ x86_64.musl.abi	2014-09-09 01:41:04.618487657 +0200
@@ -22 +22 @@
-x_regoff_t(int, size (*) [4], align (*) [4])
+x_regoff_t(long, size (*) [8], align (*) [8])
@@ -38 +38 @@
-x_u_quad_t(unsigned long, size (*) [8], align (*) [8])
+x_u_quad_t(unsigned long long, size (*) [8], align (*) [8])
@@ -54 +54 @@
-x___jmp_buf(long*, size (*) [64], align (*) [8])
+x___jmp_buf(unsigned long*, size (*) [64], align (*) [8])
@@ -61 +61 @@
-x_gregset_t(long*, size (*) [184], align (*) [8])
+x_gregset_t(long long*, size (*) [184], align (*) [8])
@@ -82 +82 @@
-x_siginfo_t(siginfo, size (*) [128], align (*) [8])
+x_siginfo_t(siginfo_t, size (*) [128], align (*) [8])
@@ -115,2 +115,2 @@
-x_crypt_data(crypt_data, size (*) [131232], align (*) [8])
-x_elf_greg_t(unsigned long, size (*) [8], align (*) [8])
+x_crypt_data(crypt_data, size (*) [260], align (*) [4])
+x_elf_greg_t(unsigned long long, size (*) [8], align (*) [8])
@@ -120 +120 @@
-x_fpregset_t(_libc_fpstate*, size (*) [8], align (*) [8])
+x_fpregset_t(_fpstate*, size (*) [8], align (*) [8])
@@ -129 +129 @@
-x_ntptimeval(ntptimeval, size (*) [72], align (*) [8])
+x_ntptimeval(ntptimeval, size (*) [32], align (*) [8])
@@ -133 +133 @@
-x_regmatch_t(regmatch_t, size (*) [8], align (*) [4])
+x_regmatch_t(regmatch_t, size (*) [16], align (*) [8])
@@ -160 +160 @@
-x_prgregset_t(unsigned long*, size (*) [216], align (*) [8])
+x_prgregset_t(unsigned long long*, size (*) [216], align (*) [8])
@@ -162 +162 @@
-x_sched_param(sched_param, size (*) [4], align (*) [4])
+x_sched_param(sched_param, size (*) [48], align (*) [8])
@@ -185 +185 @@
-x_ether_header(ether_header, size (*) [14], align (*) [1])
+x_ether_header(ether_header, size (*) [14], align (*) [2])
@@ -190,2 +190,2 @@
-x_int_fast16_t(long, size (*) [8], align (*) [8])
-x_int_fast32_t(long, size (*) [8], align (*) [8])
+x_int_fast16_t(int, size (*) [4], align (*) [4])
+x_int_fast32_t(int, size (*) [4], align (*) [4])
@@ -217 +217 @@
-x_elf_gregset_t(unsigned long*, size (*) [216], align (*) [8])
+x_elf_gregset_t(unsigned long long*, size (*) [216], align (*) [8])
@@ -227,2 +227,2 @@
-x_uint_fast16_t(unsigned long, size (*) [8], align (*) [8])
-x_uint_fast32_t(unsigned long, size (*) [8], align (*) [8])
+x_uint_fast16_t(unsigned int, size (*) [4], align (*) [4])
+x_uint_fast32_t(unsigned int, size (*) [4], align (*) [4])
@@ -267 +267 @@
-x_pthread_rwlockattr_t(pthread_rwlockattr_t, size (*) [8], align (*) [8])
+x_pthread_rwlockattr_t(pthread_rwlockattr_t, size (*) [8], align (*) [4])
@@ -278 +278 @@
-x_CODE(_code, size (*) [16], align (*) [8])
+x_CODE(CODE, size (*) [16], align (*) [8])
@@ -317 +317 @@
-x_sem_t(sem_t, size (*) [32], align (*) [8])
+x_sem_t(sem_t, size (*) [32], align (*) [4])
@@ -326 +326 @@
-x_utmpx(utmpx, size (*) [384], align (*) [4])
+x_utmpx(utmpx, size (*) [400], align (*) [8])
@@ -336 +336 @@
-x_ethhdr(ethhdr, size (*) [14], align (*) [1])
+x_ethhdr(ethhdr, size (*) [14], align (*) [2])
@@ -342 +342 @@
-x_greg_t(long, size (*) [8], align (*) [8])
+x_greg_t(long long, size (*) [8], align (*) [8])
@@ -360,2 +360,2 @@
-x_quad_t(long, size (*) [8], align (*) [8])
-x_rlim_t(unsigned long, size (*) [8], align (*) [8])
+x_quad_t(long long, size (*) [8], align (*) [8])
+x_rlim_t(unsigned long long, size (*) [8], align (*) [8])
@@ -363 +363 @@
-x_rusage(rusage, size (*) [144], align (*) [8])
+x_rusage(rusage, size (*) [272], align (*) [8])
@@ -381,2 +381,2 @@
-x_cmsghdr(cmsghdr, size (*) [16], align (*) [8])
-x_fd_mask(long, size (*) [8], align (*) [8])
+x_cmsghdr(cmsghdr, size (*) [16], align (*) [4])
+x_fd_mask(unsigned long, size (*) [8], align (*) [8])
@@ -399 +399 @@
-x_lastlog(lastlog, size (*) [292], align (*) [4])
+x_lastlog(lastlog, size (*) [296], align (*) [8])
@@ -424 +424 @@
-x_sysinfo(sysinfo, size (*) [112], align (*) [8])
+x_sysinfo(sysinfo, size (*) [368], align (*) [8])
@@ -426 +426 @@
-x_tftphdr(tftphdr, size (*) [5], align (*) [1])
+x_tftphdr(tftphdr, size (*) [6], align (*) [2])

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-09 15:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09  1:04 c++ abi Szabolcs Nagy
2014-09-09 11:43 ` Szabolcs Nagy
2014-09-09 15:00   ` 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).