summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/i386
Commit message (Collapse)AuthorAgeFilesLines
* libc/x86: fix stack unwinding and backtrace informationTimo Teräs2011-12-233-75/+28
| | | | | | | | | | | | | | | | | | | | | | | When compiled without framepointer, the DWARF-2 CFI data is required for proper stack unwinding. This patch adds the CFI information to: * syscalls (so we get proper backtrace even for release builds) the ebx hack was removed as it would complicate the CFI generation * new thread stub function (so the backtrace is clean for user created threads) Also pads the signal return trampolines separate from other functions. If CFI info was found for signal return code (which seems to happen if it's located right next a valid function), it will not be recognized as signal trampoline (gcc unwinder and gdb check first CFI info, and only if it does not exists it compares the exact opcode sequence to see if we are at signal return code block). This fixes a real crash if thread is cancelled and the cancellation handler fails to detect the signal return frame. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* */crtn.S: Remove .size directive for _init and _finiBernhard Reutner-Fischer2011-05-101-2/+0
| | | | | | | | | These are split across objects so setting size does not (and never did) work since the expression cannot be computed at assembly time. This avoids errors from recent (> 2.21) gas. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* posix_fadvise64: fix x86 implementationTimo Teräs2011-05-071-1/+3
| | | | | | | | | | | | | Commit 73d59554144f429b1cf0d4d7fa7de42bdf59ad92 completely broke the x86 implementation of posix_fadvise64. It moved the first the assembly code retn instruction gets missing depending on the Technically the file has two implementaions for posix_fadvise64, one when __NR_fadvise64_64 is available, and second one if only __NR_fadvise64 is there. Fix the #ifdef's to be proper for that. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* i386: fix .size of _init/_finiBernhard Reutner-Fischer2011-05-051-2/+2
| | | | | | | binutils-2.21 barf on .size that do not evaluate to const, so use the section size and not a function that is not visible here. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Revert "*/crt?.S: remove .size directives"Bernhard Reutner-Fischer2011-05-052-0/+3
| | | | | | Removing them generally was not a good idea This reverts commit 233c504cd940d9802226b6a3a092368b86978f5e.
* */crt?.S: remove .size directivesBernhard Reutner-Fischer2011-05-042-3/+0
| | | | | | sed -i -e '/\.size[[:space:]]/d' $(grep -l "\.size" libc/sysdeps/linux/*/crt*.[sSc]) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* bits/kernel_stat.h: no need for _LIBC guard, the file is not installed on targetPeter S. Mazinger2011-03-091-4/+0
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* unify stub logicMike Frysinger2011-02-241-5/+4
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* i386: extend IMA guards to also cover LTOBernhard Reutner-Fischer2011-02-091-2/+5
| | | | | | See GCC PR47577; TODO: Remove them. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: improve readability of math.h; expand comments and docsDenys Vlasenko2010-10-311-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nptl i686: avoid cpp problems with thunk sectionBernhard Reutner-Fischer2010-08-061-0/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* use uniform form of C99 keywordsBernhard Reutner-Fischer2010-06-241-4/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: silence warnings about undefined cpp tokensBernhard Reutner-Fischer2010-06-241-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl: fix libc sigaction signal checkingTimo Teräs2010-04-151-12/+0
| | | | | | | | | | We should not check for SIGCANCEL in __libc_sigaction because nptl calls this function to setup this signal. Nptl provides it's own override for sigaction that checks that the user cannot override signals nptl uses internally. Linuxthreads does not use SIGCANCEL at all so this affects nptl only. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Fixes NPTL build on x86.Natanael Copa2010-04-091-1/+1
| | | | | Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-061-108/+155
|\ | | | | | | | | | | | | | | Conflicts: libc/misc/utmp/utent.c libc/sysdeps/linux/i386/bits/syscalls.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * i386/bits/syscalls.h: more compact, but stack-hungry syscall code. disabled ↵Denys Vlasenko2010-04-061-18/+78
| | | | | | | | | | | | so far Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i386/bits/syscalls.h: explain _BITS_SYSCALLS_ASMDenys Vlasenko2010-04-061-45/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i386/bits/syscalls.h: generate better code using more restrictive asm ↵Denys Vlasenko2010-04-061-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constraints Example: time() doesn't push/pop two registers now, and is smaller: <__GI_time>: -57 push %edi -8b 7c 24 08 mov 0x8(%esp),%edi -53 push %ebx -89 fb mov %edi,%ebx +8b 4c 24 04 mov 0x4(%esp),%ecx +87 cb xchg %ecx,%ebx b8 0d 00 00 00 mov $0xd,%eax cd 80 int $0x80 -5b pop %ebx -5f pop %edi +87 cb xchg %ecx,%ebx c3 ret Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i386/bits/syscalls.h: explain how it works. no code changesDenys Vlasenko2010-04-061-100/+116
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | i386 unify sysdep.hAustin Foxley2010-02-181-1/+125
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | compile fixes for i386 nptlAustin Foxley2010-02-171-0/+336
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Merge remote branch 'origin/master' into nptlAustin Foxley2009-11-281-103/+0
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * bits/mmap.h: unify ala linux asm-generic effortsMike Frysinger2009-11-231-103/+0
| | | | | | | | | | | | | | | | | | | | Most ports have the same exact mman bit defines, so let's unify things like the linux kernel has with the asm-generic efforts. A few ports are left behind as they are non-trivial to merge -- the arch maintainers can tackle it if they care. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | i386 specific bit for nptlAustin Foxley2009-10-175-4/+31
|/ | | | | | | | | * RESET_PID support for clone.S * SAVE_PID, RESTORE_PID in vfork.S * fixup syscall assembly constraints to be a little less restrictive allows arbitrary variables to be used as the syscall nr Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* i386: use common INTERNAL_SYSCALL_ERROR_PMike Frysinger2009-10-151-3/+0
| | | | | | The common define has the same behavior, just formatted differently. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* clean up O_CLOEXEC handlingMike Frysinger2009-10-071-2/+0
| | | | | | | Drop the "#ifndef O_CLOEXEC" cruft, enable O_CLOEXEC in most fcntl.h headers, and import __ASSUME_O_CLOEXEC from glibc. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-09-181-1/+0
| | | | | | | | sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* honour NO_LONG_DOUBLE_MATHBernhard Reutner-Fischer2009-08-301-0/+4
| | | | | | | | This fixes compilation errors on hosts that turn off long double support for C99 like powerpc32. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* build: Include Makefile.commonarch from common Makefile.inCarmelo Amoroso2009-07-291-2/+0
| | | | | | | | Avoid including akefile.commonarch in each Makefile.arch. Include it instead from Makefile.in just after the arch specific Makefile.arch Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* enable nanosecond stat support for everyoneMike Frysinger2009-07-261-12/+6
| | | | | | | | | | | | | Fill out the stat structure so that the nanosecond resolution support is always available. There is a small code size increase for a few ports (three additional assignments in xstatconv), but otherwise everything should remain the same. While we're here, punt __old_kernel_stat from the few headers that still define it as it is unused in uClibc and causes compile errors after these nanosecond changes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* byteswap: unify common definitionsMike Frysinger2009-07-211-99/+22
| | | | | | | | | The majority of the byteswap functions are the same across all arches, so setup a common header to provide definitions if they don't exist. This allows arches to override only the ones they actually want to implement with inline assembly. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* s/UCLIBC_INTERNAL/_LIBC/gDenys Vlasenko2009-07-211-1/+1
| | | | | | | | | | Undo my old mistake. I added UCLIBC_INTERNAL define, but later I realized _LIBC is doing exactly the same thing. This change converts all usages of UCLIBC_INTERNAL to _LIBC, removing all instances of UCLIBC_INTERNAL. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* syscall: unify part 2: NCS varietyMike Frysinger2009-07-091-3/+3
| | | | | | | Declare common NCS (non-constant syscall) variants and convert the existing ports over to this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* syscall: unify common syscall definesMike Frysinger2009-07-081-66/+0
| | | | | | | | | Unify all the common syscall defines in syscalls-common.h and scrub all the duplicated code from relevant ports. This should also make converting existing ports to INLINE_SYSCALL() much easier as they don't have to get lost in all the unrelated noise, as well as creating new ports. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* i386: store errno value before using __set_errno()Ingo van Lil2009-07-031-4/+3
| | | | | | | | | | | The __syscall_error() function stores the errno value in the edx register before invoking the __set_errno() macro. When using the pthread library this macro calls thread_self() to determine the errno location, which might clobber the edx register. The errno value must be stored in a "real" variable so the compiler can take care of saving/restoring it if necessary. Signed-off-by: Ingo van Lil <inguin@gmx.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* uClibc_arch_features: sync defines between portsMike Frysinger2009-07-031-0/+6
| | | | | | | Make sure each arch has the same complete list to make comparing between them easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* mknod: widen the parameters to match kernelDenis Vlasenko2009-03-031-4/+3
| | | | | | | | | ustat: same, + remove superfluous "conversion" which does nothing at best, loses high dev bits at worst i386/bits/kernel_stat.h: update to reflect reality (wider dev_t) h8300/bits/kernel_stat.h: same arm/bits/kernel_stat.h: cosmetics to match kernel header to the letter
* docs/probe_math_exception.c:Denis Vlasenko2009-02-111-3/+14
| | | | | | | | | | | | update example libc/sysdeps/linux/i386/bits/mathinline.h: improve __finite() macro, add __finitef macro (why they aren't always macros? why aren't they arch independent?) libm/math_private.h: much better comments on math_opt_barrier() and math_force_eval() libm/s_finite[f].c: improve out-of-line __finite[f]() too (one byte less, yay...)
* libm/ldouble_wrappers.c: add libm_hidden_def's to fix testsuite buildDenis Vlasenko2009-02-021-1/+1
| | | | | | | test/Rules.mak: don't pass target options to host build test/math/basic-test.c: fix test build error patching file test/unistd/errno.c: fix test build warning
* - fixup incomplete r24515 (fix redefinitions of posix_types for i386->x86_64 ↵Bernhard Reutner-Fischer2009-01-121-0/+1
| | | | with linux >= 2.6.28)
* - whitespace cleanup; no obj-code changesBernhard Reutner-Fischer2008-12-292-23/+23
|
* These defines needs to be considered after recent linux kernel combined i386 ↵Khem Raj2008-12-231-2/+6
| | | | and x86_64 into x86
* Remove __libc_posix_fadvise[64] alias. It existed on i386 and arm only,Denis Vlasenko2008-12-151-9/+17
| | | | | | | | | and google says only uclibc has it, no users at all. text data bss dec hex filename - 229374 1367 11280 242021 3b165 lib/libuClibc-0.9.30-svn.so + 229347 1367 11280 241994 3b14a lib/libuClibc-0.9.30-svn.so
* sigaction overhaul as described in docs/sigaction.txtDenis Vlasenko2008-12-151-93/+65
| | | | | Run tested on i386.
* Remove the rest of "bounded pointers" scaffolding. gcc website says"Denis Vlasenko2008-12-131-4/+4
| | | | | | "Bounds Checking Projects... This project has been abandoned" for four years at least.
* i386/brk.c: gcc can't figure out how to use %ebx in PIC mode,Denis Vlasenko2008-12-121-7/+12
| | | | | help it. Code size is the same.
* smaller brk() for i386. Inspected assembly to see it's still valid.Denis Vlasenko2008-12-121-14/+12
| | | | | | | text data bss dec hex filename - 44 0 4 48 30 libc/sysdeps/linux/i386/brk.o + 42 0 4 46 2e libc/sysdeps/linux/i386/brk.o
* fix sigset_t size for mips (it's the only arch with 128 signals).Denis Vlasenko2008-12-011-28/+34
| | | | | | | fix _NSIG for it. better document what's going on in sigaction(). seems to not induce any actual code changes (sans mips).
* fix ioperm build problems caused by libc_hidden_proto removalDenis Vlasenko2008-11-212-0/+2
|