1. 12 12月, 2012 6 次提交
  2. 11 12月, 2012 4 次提交
  3. 08 12月, 2012 5 次提交
    • R
      add support for ctors/dtors on arm with modern gcc · 34aa169d
      Rich Felker 提交于
      a while back, gcc switched from using the old _init/_fini fragments
      method for calling ctors and dtors on arm to the __init_array and
      __fini_array method. unfortunately, on glibc this depends on ugly
      hacks involving making libc.so a linker script and pulling parts of
      libc into the main program binary. so I cheat a little bit, and just
      write asm to iterate over the init/fini arrays from the _init/_fini
      asm. the same approach could be used on any arch it's needed on, but
      for now arm is the only one.
      34aa169d
    • R
      page-align initial brk value used by malloc in shared libc · b8ccf8e4
      Rich Felker 提交于
      this change fixes an obscure issue with some nonstandard kernels,
      where the initial brk syscall returns a pointer just past the end of
      bss rather than the beginning of a new page. in that case, the dynamic
      linker has already reclaimed the space between the end of bss and the
      page end for use by malloc, and memory corruption (allocating the same
      memory twice) will occur when malloc again claims it on the first call
      to brk.
      b8ccf8e4
    • R
      remove __arch_prctl alias for arch_prctl · 3ee67505
      Rich Felker 提交于
      if there's evidence of any use for it, we can add it back later. as
      far as I can tell, glibc has it only for internal use (and musl uses a
      direct syscall in that case rather than a function call), not for
      exposing it to applications.
      3ee67505
    • R
      55aef73f
    • R
      03b0f13e
  4. 07 12月, 2012 18 次提交
  5. 06 12月, 2012 7 次提交
    • R
      add more arch-specific MAP_ macros to bits/mman.h · 7e0d4fce
      rofl0r 提交于
      these are also needed by qemu.
      7e0d4fce
    • R
      remove MAP_32 from non-x86 archs · db846a62
      rofl0r 提交于
      both kernel and glibc define it only on x86(_64).
      db846a62
    • R
      add MAP_NORESERVE to bits/mman.h · 0e10f740
      rofl0r 提交于
      this is needed for qemu, and since it differs for each arch
      it can't be circumvented easily by using a macro in CFLAGS.
      0e10f740
    • R
      remove fenv saving/loading code from setjmp/longjmp on arm · 4b43f05f
      Rich Felker 提交于
      the issue is identical to the recent commit fixing the mips versions:
      despite other implementations doing this, it conflicts with the
      requirements of ISO C and it's a waste of time and code size.
      4b43f05f
    • R
      fix inefficiency of math.h isless, etc. macros · 96b3ea53
      Rich Felker 提交于
      previously, everything was going through an intermediate conversion to
      long double, which caused the extern __fpclassifyl function to get
      invoked, preventing virtually all optimizations of these operations.
      
      with the new code, tests on constant float or double arguments compile
      to a constant 0 or 1, and tests on non-constant expressions are
      efficient. I may later add support for __builtin versions on compilers
      that support them.
      96b3ea53
    • R
      remove mips setjmp/longjmp code to save/restore fenv · b088f855
      Rich Felker 提交于
      nothing in the standard requires or even allows the fenv state to be
      restored by longjmp. restoring the exception flags is not such a big
      deal since it's probably valid to clobber them completely, but
      restoring the rounding mode yields an observable side effect not
      sanctioned by ISO C. saving/restoring it also wastes a few cycles and
      16 bytes of code.
      
      as for historical behavior, reportedly SGI IRIX did save/restore fenv,
      and this is where glibc and uClibc got the behavior from. a few other
      systems save/restore it too (on archs other than mips), even though
      this is apparently wrong. further details are documented here:
      
      http://www-personal.umich.edu/~williams/archive/computation/setjmp-fpmode.html
      
      as musl aims for standards conformance rather than coddling historical
      programs expecting non-conforming behavior, and as it's unlikely that
      any historical programs actually depend on the incorrect behavior
      (such programs would break on other archs, anyway), I'm making the
      change not to save/restore fenv on mips.
      b088f855
    • R
      add scsi headers scsi.h and sg.h · 91b05889
      Rich Felker 提交于
      due to some historical oddity, these are considered libc headers
      rather than kernel headers. the kernel used to provide them too, but
      it seems modern kernels do not install them, so let's just do the
      easiest thing and provide them. stripped-down versions provided by
      John Spencer.
      91b05889