mailing list of musl libc
 help / color / mirror / code / Atom feed
* musl 1.1.12 released
@ 2015-10-20  3:13 Rich Felker
  2015-10-22 20:21 ` __write alias missing on arm platforms Sebastian Gottschall
  0 siblings, 1 reply; 6+ messages in thread
From: Rich Felker @ 2015-10-20  3:13 UTC (permalink / raw)
  To: musl

This release features arch-independent support for FDPIC, an ABI
variant that allows text segment sharing without MMU by relaxing the
usual ELF requirement that data reside at a fixed displacement
relative to code, and arch-specific support for FDPIC on SH2. CFI
(call frame information) generation support has also been added for
x86_64 asm, improving debugging backtraces, especially when a program
is stopped during a syscall.

Several toolchain and application compatibility improvements have been
made, most notably in regards to the new byte-based C locale, where
nl_langinfo(CODESET) now returns "ASCII" rather than
"UTF-8-CODE-UNITS"; the latter broke many applications which assumed
the returned string would be a meaningful, well-known character
encoding name.

Bugs fixed include deadlock at exit when stdin or stdout was closed, a
missing memory barrier in pthread_join, and minor corner case bugs in
various interfaces.

http://www.musl-libc.org/releases/musl-1.1.12.tar.gz
http://www.musl-libc.org/releases/musl-1.1.12.tar.gz.asc

Special thanks to musl's release sponsors (patreon.com/musl):

* Les Aker
* Kelsey Hightower
* Hurricane Labs (hurricanelabs.com)
* Justin Cormack
* The Midipix Project (midipix.org)


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

* __write alias missing on arm platforms
  2015-10-20  3:13 musl 1.1.12 released Rich Felker
@ 2015-10-22 20:21 ` Sebastian Gottschall
  2015-10-22 20:55   ` Rich Felker
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Gottschall @ 2015-10-22 20:21 UTC (permalink / raw)
  To: musl

musl is missing the __write function which seem to be a alias to "write".
this is required by libgcc on arm platforms. under some conditions the 
compiler will generate code which does reference
this function then which leads to unresolved symbols
(seen on squid 4.0.1 on xscale)

/home/xfs/toolchains/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/bin/../lib64/gcc/armeb-openwrt-linux-muslgnueabi/5.2.0/libgcc.a(linux-atomic-64bit.o): 
In function `__check_for_sync8_kernelhelper':
/home/xfs/openwrt/trunk2/trunk/build_dir/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/gcc-5.2.0/libgcc/config/arm/linux-atomic-64bit.c:59: 
undefined reference to `__write'
collect2: error: ld returned 1 exit status
l

Sebastian


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

* Re: __write alias missing on arm platforms
  2015-10-22 20:21 ` __write alias missing on arm platforms Sebastian Gottschall
@ 2015-10-22 20:55   ` Rich Felker
  2015-10-22 21:18     ` Sebastian Gottschall
  0 siblings, 1 reply; 6+ messages in thread
From: Rich Felker @ 2015-10-22 20:55 UTC (permalink / raw)
  To: Sebastian Gottschall; +Cc: musl

On Thu, Oct 22, 2015 at 10:21:54PM +0200, Sebastian Gottschall wrote:
> musl is missing the __write function which seem to be a alias to "write".
> this is required by libgcc on arm platforms. under some conditions
> the compiler will generate code which does reference
> this function then which leads to unresolved symbols
> (seen on squid 4.0.1 on xscale)
> 
> /home/xfs/toolchains/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/bin/../lib64/gcc/armeb-openwrt-linux-muslgnueabi/5.2.0/libgcc.a(linux-atomic-64bit.o):
> In function `__check_for_sync8_kernelhelper':
> /home/xfs/openwrt/trunk2/trunk/build_dir/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/gcc-5.2.0/libgcc/config/arm/linux-atomic-64bit.c:59:
> undefined reference to `__write'
> collect2: error: ld returned 1 exit status
> l

__write is not a public API even in glibc as far as I can tell. This
looks like an abuse of an accidentally-public symbol by libgcc. For
musl target anyway it should just be patched out of libgcc, e.g. with
#ifdef.

Rich


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

* Re: __write alias missing on arm platforms
  2015-10-22 20:55   ` Rich Felker
@ 2015-10-22 21:18     ` Sebastian Gottschall
  2015-10-22 21:26       ` Szabolcs Nagy
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Gottschall @ 2015-10-22 21:18 UTC (permalink / raw)
  To: Rich Felker, musl

Am 22.10.2015 um 22:55 schrieb Rich Felker:
> On Thu, Oct 22, 2015 at 10:21:54PM +0200, Sebastian Gottschall wrote:
>> musl is missing the __write function which seem to be a alias to "write".
>> this is required by libgcc on arm platforms. under some conditions
>> the compiler will generate code which does reference
>> this function then which leads to unresolved symbols
>> (seen on squid 4.0.1 on xscale)
>>
>> /home/xfs/toolchains/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/bin/../lib64/gcc/armeb-openwrt-linux-muslgnueabi/5.2.0/libgcc.a(linux-atomic-64bit.o):
>> In function `__check_for_sync8_kernelhelper':
>> /home/xfs/openwrt/trunk2/trunk/build_dir/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/gcc-5.2.0/libgcc/config/arm/linux-atomic-64bit.c:59:
>> undefined reference to `__write'
>> collect2: error: ld returned 1 exit status
>> l
> __write is not a public API even in glibc as far as I can tell. This
> looks like an abuse of an accidentally-public symbol by libgcc. For
> musl target anyway it should just be patched out of libgcc, e.g. with
> #ifdef.
you mean i have to send a bug report to GCC maintainers? i its part if 
the libgcc sourcecode and is not provided by libgcc, but just referenced
i checked uclibc and glibc. both define __write as alias for write just 
because of libgcc

so lets declare musl as broken on arm if gcc is used, if this is a 
solution for you :-)

>
> Rich
>



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

* Re: __write alias missing on arm platforms
  2015-10-22 21:18     ` Sebastian Gottschall
@ 2015-10-22 21:26       ` Szabolcs Nagy
  2015-11-05 12:38         ` Szabolcs Nagy
  0 siblings, 1 reply; 6+ messages in thread
From: Szabolcs Nagy @ 2015-10-22 21:26 UTC (permalink / raw)
  To: musl; +Cc: Rich Felker

* Sebastian Gottschall <s.gottschall@dd-wrt.com> [2015-10-22 23:18:54 +0200]:
> Am 22.10.2015 um 22:55 schrieb Rich Felker:
> >On Thu, Oct 22, 2015 at 10:21:54PM +0200, Sebastian Gottschall wrote:
> >>musl is missing the __write function which seem to be a alias to "write".
> >>this is required by libgcc on arm platforms. under some conditions
> >>the compiler will generate code which does reference
> >>this function then which leads to unresolved symbols
> >>(seen on squid 4.0.1 on xscale)
> >>
> >>/home/xfs/toolchains/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/bin/../lib64/gcc/armeb-openwrt-linux-muslgnueabi/5.2.0/libgcc.a(linux-atomic-64bit.o):
> >>In function `__check_for_sync8_kernelhelper':
> >>/home/xfs/openwrt/trunk2/trunk/build_dir/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/gcc-5.2.0/libgcc/config/arm/linux-atomic-64bit.c:59:
> >>undefined reference to `__write'
> >>collect2: error: ld returned 1 exit status
> >>l
> >__write is not a public API even in glibc as far as I can tell. This
> >looks like an abuse of an accidentally-public symbol by libgcc. For
> >musl target anyway it should just be patched out of libgcc, e.g. with
> >#ifdef.
> you mean i have to send a bug report to GCC maintainers? i its part if the
> libgcc sourcecode and is not provided by libgcc, but just referenced
> i checked uclibc and glibc. both define __write as alias for write just
> because of libgcc
> 
> so lets declare musl as broken on arm if gcc is used, if this is a solution
> for you :-)
> 

i will submit a bug report about this.

it should be fixed in gcc, __write is not
part of any official abi (not even lsb!),
there is no reason to use that here,
it is broken on many platforms not just musl
(bionic does not have it either).

meanwhile we can think about some workaround
(the most obvious is to patch libgcc since
you are rebuilding gcc anyway, just remove
the __write call and leave abort there)

> >
> >Rich
> >


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

* Re: __write alias missing on arm platforms
  2015-10-22 21:26       ` Szabolcs Nagy
@ 2015-11-05 12:38         ` Szabolcs Nagy
  0 siblings, 0 replies; 6+ messages in thread
From: Szabolcs Nagy @ 2015-11-05 12:38 UTC (permalink / raw)
  To: musl, Rich Felker

* Szabolcs Nagy <nsz@port70.net> [2015-10-22 23:26:51 +0200]:
> * Sebastian Gottschall <s.gottschall@dd-wrt.com> [2015-10-22 23:18:54 +0200]:
> > Am 22.10.2015 um 22:55 schrieb Rich Felker:
> > >On Thu, Oct 22, 2015 at 10:21:54PM +0200, Sebastian Gottschall wrote:
> > >>musl is missing the __write function which seem to be a alias to "write".
> > >>this is required by libgcc on arm platforms. under some conditions
> > >>the compiler will generate code which does reference
> > >>this function then which leads to unresolved symbols
> > >>(seen on squid 4.0.1 on xscale)
> > >>
> > >>/home/xfs/toolchains/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/bin/../lib64/gcc/armeb-openwrt-linux-muslgnueabi/5.2.0/libgcc.a(linux-atomic-64bit.o):
> > >>In function `__check_for_sync8_kernelhelper':
> > >>/home/xfs/openwrt/trunk2/trunk/build_dir/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/gcc-5.2.0/libgcc/config/arm/linux-atomic-64bit.c:59:
> > >>undefined reference to `__write'
> > >>collect2: error: ld returned 1 exit status
> > >>l
> > >__write is not a public API even in glibc as far as I can tell. This
> > >looks like an abuse of an accidentally-public symbol by libgcc. For
> > >musl target anyway it should just be patched out of libgcc, e.g. with
> > >#ifdef.
> > you mean i have to send a bug report to GCC maintainers? i its part if the
> > libgcc sourcecode and is not provided by libgcc, but just referenced
> > i checked uclibc and glibc. both define __write as alias for write just
> > because of libgcc
> > 
> > so lets declare musl as broken on arm if gcc is used, if this is a solution
> > for you :-)
> > 
> 
> i will submit a bug report about this.
> 
> it should be fixed in gcc, __write is not

this patch should fix your problem:
https://gcc.gnu.org/ml/gcc-patches/2015-11/msg00456.html


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

end of thread, other threads:[~2015-11-05 12:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-20  3:13 musl 1.1.12 released Rich Felker
2015-10-22 20:21 ` __write alias missing on arm platforms Sebastian Gottschall
2015-10-22 20:55   ` Rich Felker
2015-10-22 21:18     ` Sebastian Gottschall
2015-10-22 21:26       ` Szabolcs Nagy
2015-11-05 12:38         ` Szabolcs Nagy

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).