1. 03 6月, 2018 1 次提交
    • S
      fix TLS layout of TLS variant I when there is a gap above TP · 610c5a85
      Szabolcs Nagy 提交于
      In TLS variant I the TLS is above TP (or above a fixed offset from TP)
      but on some targets there is a reserved gap above TP before TLS starts.
      
      This matters for the local-exec tls access model when the offsets of
      TLS variables from the TP are hard coded by the linker into the
      executable, so the libc must compute these offsets the same way as the
      linker.  The tls offset of the main module has to be
      
      	alignup(GAP_ABOVE_TP, main_tls_align).
      
      If there is no TLS in the main module then the gap can be ignored
      since musl does not use it and the tls access models of shared
      libraries are not affected.
      
      The previous setup only worked if (tls_align & -GAP_ABOVE_TP) == 0
      (i.e. TLS did not require large alignment) because the gap was
      treated as a fixed offset from TP.  Now the TP points at the end
      of the pthread struct (which is aligned) and there is a gap above
      it (which may also need alignment).
      
      The fix required changing TP_ADJ and __pthread_self on affected
      targets (aarch64, arm and sh) and in the tlsdesc asm the offset to
      access the dtv changed too.
      610c5a85
  2. 11 3月, 2018 1 次提交
    • R
      fix minor namespace issues in termios.h · eb5ae940
      Rich Felker 提交于
      the output delay features (NL*, CR*, TAB*, BS*, and VT*) are
      XSI-shaded. VT* is in the V* namespace reservation but the rest need
      to be suppressed in base POSIX namespace.
      
      unfortunately this change introduces feature test macro checks into
      another bits header. at some point these checks should be simplified
      by having features.h handle the "FTM X implies Y" relationships.
      eb5ae940
  3. 23 2月, 2018 2 次提交
    • S
      add MAP_SYNC and MAP_SHARED_VALIDATE from linux v4.15 · 9b57db3f
      Szabolcs Nagy 提交于
      for synchronous page faults, new in linux commit
      1c9725974074a047f6080eecc62c50a8e840d050 and
      b6fb293f2497a9841d94f6b57bd2bb2cd222da43
      note that only targets that use asm-generic/mman.h have this new
      flag defined, so undef it on other targets (mips*, powerpc*).
      9b57db3f
    • S
      mips,powerpc: fix TIOCSER_TEMT in termios.h · 9eda4dc6
      Szabolcs Nagy 提交于
      use the same token to define TIOCSER_TEMT as is used in ioctl.h
      so when both headers are included there are no redefinition warnings
      during musl build.
      9eda4dc6
  4. 06 11月, 2017 2 次提交
  5. 30 8月, 2017 2 次提交
  6. 01 6月, 2017 2 次提交
    • R
      remove long-obsolete clang workarounds from mips* syscall_arch.h files · 1c497005
      Rich Felker 提交于
      at one point, clang reportedly failed to support the asm register
      constraints needed for inline syscalls. versions of clang that old
      have much bigger problems that preclude using them to compile musl
      libc.
      1c497005
    • R
      fix fstatat syscall on mips64 · 4073f03a
      Rich Felker 提交于
      mips64 requires 'struct stat' conversion due to incorrect 32-bit
      fields where time_t should be in the kernel version of the structure.
      syscall_arch.h already performed the correct translation for stat,
      fstat, and lstat syscalls, but omitted special handling for fstatat.
      4073f03a
  7. 30 12月, 2016 1 次提交
  8. 20 10月, 2016 1 次提交
    • S
      add bits/hwcap.h and include it in sys/auxv.h · fe39aaae
      Szabolcs Nagy 提交于
      aarch64, arm, mips, mips64, mipsn32, powerpc, powerpc64 and sh have
      cpu feature bits defined in linux for AT_HWCAP auxv entry, so expose
      those in sys/auxv.h
      
      it seems the mips hwcaps were never exposed to userspace neither
      by linux nor by glibc, but that's most likely an oversight.
      fe39aaae
  9. 14 7月, 2016 1 次提交
  10. 04 7月, 2016 8 次提交
  11. 03 7月, 2016 1 次提交
    • R
      add consistent reserved fields in mips64/n32 termios structures · 7158481d
      Rich Felker 提交于
      the (unused) speed fields were omitted when these ports were first
      added (within this release cycle, so not present in any release yet)
      in accordance with how glibc defines the structure on mips archs.
      however their omission does not match existing musl practice/intent.
      
      glibc provides its own, mostly-unified termios structure definition
      and performs translation in userspace to match the kernel structure
      for the arch, but has gratuitous differences on a few archs like mips,
      presumably as a result of historical mistakes. some other libcs use
      the kernel definitions directly. musl essentially does that, by
      matching the kernel layout in the part of the structure the kernel
      will read/write, but leaves additional space at the end for
      extensibility. these are nominally the (nonstandard) speed fields and
      (on most archs) extra c_cc elements, but since they are not used they
      could be repurposed if there's ever a need.
      7158481d
  12. 10 6月, 2016 1 次提交
    • S
      add preadv2 and pwritev2 syscall numbers for linux v4.6 · 78b1f3cb
      Szabolcs Nagy 提交于
      the syscalls take an additional flag argument, they were added in commit
      f17d8b35452cab31a70d224964cd583fb2845449 and a RWF_HIPRI priority hint
      flag was added to linux/fs.h in 97be7ebe53915af504fb491fb99f064c7cf3cb09.
      
      the syscall is not allocated for microblaze and sh yet.
      78b1f3cb
  13. 12 5月, 2016 1 次提交
  14. 03 4月, 2016 1 次提交
    • R
      add support for mips and mips64 r6 isa · 6d99ad91
      Rich Felker 提交于
      mips32r6 and mips64r6 are actually new isas at both the asm source and
      opcode levels (pre-r6 code cannot run on r6) and thus need to be
      treated as a new subarch. the following changes are made, some of
      which yield code generation improvements for non-r6 targets too:
      
      - add subarch logic in configure script and reloc.h files for dynamic
        linker name.
      
      - suppress use of .set mips2 asm directives (used to allow mips2
        atomic instructions on baseline mips1 builds; the kernel has to
        emulate them on mips1) except when actually needed. they cause wrong
        instruction encodings on r6, and pessimize inlining on at least some
        compilers.
      
      - only hard-code sync instruction encoding on mips1.
      
      - use "ZC" constraint instead of "m" constraint for llsc memory
        operands on r6, where the ll/sc instructions no longer accept full
        16-bit offsets.
      
      - only hard-code rdhwr instruction encoding with .word on targets
        (pre-r2) where it may need trap-and-emulate by the kernel.
        otherwise, just use the instruction mnemonic, and allow an arbitrary
        destination register to be used.
      6d99ad91
  15. 19 3月, 2016 3 次提交
    • S
      add copy_file_range syscall numbers from linux v4.5 · 84d4f5ee
      Szabolcs Nagy 提交于
      it was introduced for offloading copying between regular files
      in linux commit 29732938a6289a15e907da234d6692a2ead71855
      
      (microblaze and sh does not yet have the syscall number.)
      84d4f5ee
    • S
      mips64: add recent linux syscall numbers · 2de52704
      Szabolcs Nagy 提交于
      add userfaultfd, membarrier and mlock2 system call numbers.
      2de52704
    • S
      deduplicate bits/mman.h · e9f1c798
      Szabolcs Nagy 提交于
      currently five targets use the same mman.h constants and the rest
      share most constants too, so move them to sys/mman.h before the
      bits/mman.h include where the differences can be corrected by
      redefinition of the macros.
      
      this fixes two minor bugs: POSIX_MADV_DONTNEED was wrong on most
      targets (it should be the same as MADV_DONTNEED), and sh defined
      the x86-only MAP_32BIT mmap flag.
      e9f1c798
  16. 11 3月, 2016 2 次提交
  17. 07 3月, 2016 1 次提交
    • R
      add mips64 port · 83933573
      Rich Felker 提交于
      patch by Mahesh Bodapati and Jaydeep Patil of Imagination
      Technologies.
      83933573