1. 25 5月, 2012 1 次提交
  2. 23 5月, 2012 1 次提交
    • R
      fix missing _BSD_SOURCE support in bits/*.h · 030b452b
      Rich Felker 提交于
      this is actually rather ugly, and would get even uglier if we ever
      want to support further feature test macros. at some point i may
      factor the bits headers into separate files for C base, POSIX base,
      and nonstandard extensions (the only distinctions that seem to matter
      now) and then the logic for which to include can go in the main header
      rather than being duplicated for each arch. the downside of this is
      that it would result in more files having to be opened during
      compilation, so as long as the ugliness does not grow, i'm inclined to
      leave it alone for now.
      030b452b
  3. 30 4月, 2012 1 次提交
  4. 27 4月, 2012 1 次提交
  5. 25 4月, 2012 1 次提交
  6. 16 4月, 2012 2 次提交
  7. 04 4月, 2012 1 次提交
    • R
      work around nasty gcc bug in the i386 syscall asm · 5bd0ab8a
      Rich Felker 提交于
      when the "r" (register) constraint is used to let gcc choose a
      register, gcc will sometimes assign the same register that was used
      for one of the other fixed-register operands, if it knows the values
      are the same. one common case is multiple zero arguments to a syscall.
      this horribly breaks the intended usage, which is swapping the GOT
      pointer from ebx into the temp register and back to perform the
      syscall.
      
      presumably there is a way to fix this with advanced usage of register
      constaints on the inline asm, but having bad memories about hellish
      compatibility issues with different gcc versions, for the time being
      i'm just going to hard-code specific registers to be used. this may
      hurt the compiler's ability to optimize, but it will fix serious
      miscompilation issues.
      
      so far the only function i know what compiled incorrectly is
      getrlimit.c, and naturally the bug only applies to shared (PIC)
      builds, but it may be more extensive and may have gone undetected..
      5bd0ab8a
  8. 22 3月, 2012 1 次提交
    • R
      fix DECIMAL_DIG definitions · 47db8903
      Rich Felker 提交于
      DECIMAL_DIG is not the same as LDBL_DIG
      
      type_DIG is the maximimum number of decimal digits that can survive a
      round trip from decimal to type and back to decimal.
      
      DECIMAL_DIG is the minimum number of decimal digits required in order
      for any floating point type to survive the round trip to decimal and
      back, and it is generally larger than LDBL_DIG. since the exact
      formula is non-trivial, and defining it larger than necessary may be
      legal but wasteful, just define the right value in bits/float.h.
      47db8903
  9. 25 2月, 2012 1 次提交
  10. 16 2月, 2012 1 次提交
  11. 09 2月, 2012 1 次提交
    • R
      replace bad cancellation cleanup abi with a sane one · afc35d5e
      Rich Felker 提交于
      the old abi was intended to duplicate glibc's abi at the expense of
      being ugly and slow, but it turns out glib was not even using that abi
      except on non-gcc-compatible compilers (which it doesn't even support)
      and was instead using an exceptions-in-c/unwind-based approach whose
      abi we could not duplicate anyway without nasty dwarf2/unwind
      integration.
      
      the new abi is copied from a very old glibc abi, which seems to still
      be supported/present in current glibc. it avoids all unwinding,
      whether by sjlj or exceptions, and merely maintains a linked list of
      cleanup functions to be called from the context of pthread_exit. i've
      made some care to ensure that longjmp out of a cleanup function should
      work, even though it is not required to.
      
      this change breaks abi compatibility with programs which were using
      pthread cancellation, which is unfortunate, but that's why i'm making
      the change now rather than later. considering that most pthread
      features have not been usable until recently anyway, i don't see it as
      a major issue at this point.
      afc35d5e
  12. 21 1月, 2012 1 次提交
  13. 18 10月, 2011 1 次提交
  14. 15 10月, 2011 1 次提交
    • R
      don't define wchar_t on c++ · 1d3c2768
      Rich Felker 提交于
      it's a keyword in c++ (wtf). i'm not sure this is the cleanest
      solution; it might be better to avoid ever defining __NEED_wchar_t on
      c++. but in any case, this works for now.
      1d3c2768
  15. 05 10月, 2011 1 次提交
  16. 01 10月, 2011 3 次提交
  17. 23 9月, 2011 4 次提交
  18. 22 9月, 2011 1 次提交
  19. 20 9月, 2011 4 次提交
  20. 19 9月, 2011 4 次提交
  21. 23 8月, 2011 1 次提交
    • R
      security hardening: ensure suid programs have valid stdin/out/err · df0b5a49
      Rich Felker 提交于
      this behavior (opening fds 0-2 for a suid program) is explicitly
      allowed (but not required) by POSIX to protect badly-written suid
      programs from clobbering files they later open.
      
      this commit does add some cost in startup code, but the availability
      of auxv and the security flag will be useful elsewhere in the future.
      in particular auxv is needed for static-linked vdso support, which is
      still waiting to be committed (sorry nik!)
      df0b5a49
  22. 15 8月, 2011 1 次提交
  23. 07 8月, 2011 1 次提交
  24. 22 7月, 2011 1 次提交
  25. 26 6月, 2011 2 次提交
  26. 25 6月, 2011 1 次提交
  27. 19 6月, 2011 1 次提交
    • R
      experimental dynamic linker! · 51e2d831
      Rich Felker 提交于
      some notes:
      - library search path is hard coded
      - x86_64 code is untested and may not work
      - dlopen/dlsym is not yet implemented
      - relocations in read-only memory won't work
      51e2d831