OSDN Git Service
Filippo Arcidiacono [Mon, 13 May 2013 12:06:11 +0000 (14:06 +0200)]
libubacktrace: fix build due to some typos
Commit
71c10c484e7dc113396cccb7e503befb759c6346 broke libubactrace build
due to some typos, so that backtrace.o[sS] were not built.
This definetively fixes this problem.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Mike Frysinger [Sun, 19 May 2013 05:09:07 +0000 (01:09 -0400)]
i386: punt all config options that just control -march
You can set these yourself in your CFLAGS, and our list is incomplete
and pointless (we agreed some time ago to stop doing this).
We keep around CONFIG_[3456]86 because it is used to select between
different optimized subdirs of handcoded assembly.
Also take this opportunity to up the default to i686. If you're using
an older cpu, then you can handle changing this yourself.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Filippo Arcidiacono [Thu, 9 May 2013 09:42:23 +0000 (11:42 +0200)]
libubacktrace: fix backtrace for statically linked application
libgcc_s.so's unwinder could not access unwind tables of statically
linked binaries, so we really want to use _Unwind_* stuff from
libgcc_eh.a.
It required to build backtrace.c differentiating between shared and
static case.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Filippo Arcidiacono [Thu, 9 May 2013 07:04:20 +0000 (09:04 +0200)]
libdl: fix dlopen implementation from statically linked application
Calling dlopen from statically linked application is actually broken,
because _dl_find_hash enters into an infinite loop when trying to
resolve symbols. In this case it doesn't need to extend the global
scope, it is readyto be used as it is, because _dl_loaded_modules already points
to the dlopened library.
The patch also fixesi a typo in __LDSO_LD_LIBRARY_PATH__ macro, that was
preventing to get the actual value of the LD_LIBRARY_PATH.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Filippo ARCIDIACONO [Fri, 14 Dec 2012 10:40:05 +0000 (11:40 +0100)]
libc: deal with aux vect inside __uClibc_main only if !SHARED
It's not safe to use the aux vect inside __uClibc_main if we are running
with shared libraries, because it could have been already modified.
For example, if some constructor plays with environment variables by
using unsetenv, the modifications done into the stack to unset an
environment variable, have impacts on the aux vect due to the extra NULL
entries added.
Due to this, __uClibc_main is not able to detect where the aux vect
starts, so all the entries that are used by __uClibc_main (AT_UID,
AT_EUID, AT_GID, AT_EGID, AT_PAGESZ and possibly other arch specific)
are impacted.
Same side effect on the aux vect is caused by the ld.so when running a
SUID program with some of the unsecure environment variables set, that
will be unset by the ld.so itself.
In order to fix this issue, it needs to handle aux vect entries into
__uClibc_main only if SHARED is not defined.
In SHARED case, libc refers to __dl_secure and _dl_pagesize as initialised
by the ld.so where the aux vext is still untouched.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Reviewed-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Mike Frysinger [Sun, 7 Apr 2013 06:19:53 +0000 (02:19 -0400)]
linux: pread/write: fix 64bit handling
The syscall on 64bit ports takes 4 args as there is no need to split
up the value into two args. Add support for that to the common code.
Once we fix that, the mips code can now leverage it for its 64bit and
32bit needs. However, we can't just drop it entirely yet because its
n32 ABI needs special handling to treat it like a 64bit port. This
does change the existing behavior which treats the n32 like a 32bit
port, but we want to do this.
In the future, we'll probably have to introduce a define for this as
it currently affects x86_64/x32 and mips/n32.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Bernhard Reutner-Fischer [Wed, 3 Apr 2013 22:31:03 +0000 (00:31 +0200)]
buildsys: fix realclean
For anything but (toplevel) clean, CLEAN_%, we need .config
Otherwise realclean would leave stuff behind that was not intended to
survive.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 3 Apr 2013 22:25:06 +0000 (00:25 +0200)]
add UCLIBC_SUSV2_LEGACY to hide valloc
valloc was marked as LEGACY in SUSv2, removed from SUSv3 and later.
TODO: Remove this (point people to memalign and it's successors?).
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 3 Apr 2013 22:12:25 +0000 (00:12 +0200)]
relinfo.pl: use correct interpreter
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 3 Apr 2013 22:06:29 +0000 (00:06 +0200)]
relinfo.pl: silence warning
$* is no longer supported at extra/scripts/relinfo.pl line 2.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 3 Apr 2013 20:54:00 +0000 (22:54 +0200)]
stdlib: avoid relocation
valloc uses memalign
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Mon, 1 Apr 2013 09:53:38 +0000 (05:53 -0400)]
linux: pread/write: convert to SYSCALL_ALIGN_64BIT
The pread64/write64 syscalls have the 64bit register align issue for
all arches. Use this new define so we can merge the powerc/xtensa
versions back into the common code.
SuperH is funky and also allows us to do this.
We should be able to merge the mips version too, but that'll require
someone to take a closer look as the current stuff doesn't look quite
right.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Mon, 1 Apr 2013 09:40:42 +0000 (05:40 -0400)]
linux: readahead: convert to SYSCALL_ALIGN_64BIT
The readahead syscall has the 64bit register align issue for all
arches. Only mips was handling this though.
Clean up the common readahead.c to use the SYSCALL_ALIGN_64BIT
define so that we can throw away the mips version and make this
work correctly on arm/ppc/xtensa.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Mon, 1 Apr 2013 09:29:23 +0000 (05:29 -0400)]
linux: posix_fadvise: use new SYSCALL_ALIGN_64BIT
Now that we have a new SYSCALL_ALIGN_64BIT define for tracking the
64bit register shift behavior, use it. This allows us to delete
duplicated arm/xtensa files, as well as drop a few arch ifdefs from
common code.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Mon, 1 Apr 2013 09:09:17 +0000 (05:09 -0400)]
linux: use OFF64_HI_LO rather than __LONG_LONG_PAIR
This macro takes care of the shift/mask split for us, so no need
to open code this ourselves and then use __LONG_LONG_PAIR.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Mon, 1 Apr 2013 08:49:24 +0000 (04:49 -0400)]
mips: only define SYSCALL_ALIGN_64BIT for O32 ABIs
The 64bit register alignment issue only affects the O32 ABI, so wrap
the define accordingly. We don't want this being used for N32 ABIs.
This doesn't directly affect the N64 ABI since these files wouldn't
even be compiled for those targets (no need for the 32bit/64bit shim).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Mon, 1 Apr 2013 08:47:08 +0000 (04:47 -0400)]
libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BIT
The reason truncate64 takes 4 args on some arches is that their ABI
requires 64bit values to be aligned on register pair boundaries.
Since this alignment affects more than just truncate64, rename the
define to properly document its purpose. This also allows us to
expand it to the other impacted syscalls (which will be done in a
follow up commit).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Bernhard Reutner-Fischer [Fri, 29 Mar 2013 12:34:54 +0000 (13:34 +0100)]
Revert "_scanf.c: Implement 'm' modifier for 'c' and '[' conversions."
This reverts commit
e567c399ff86d007d8c4586f0dd5e0ca61e283ca.
since it breaks badly (e.g. busybox netstat)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mirko Vogt [Fri, 21 Sep 2012 15:29:15 +0000 (17:29 +0200)]
_vfprintf.c: use 'fputws_unlocked(S, F)' instead of 'fputws(S, F)'
This eliminates a source of reproduceable freezes
Signed-off-by: Mirko Vogt <dev@nanl.de>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Felix Fietkau [Fri, 21 Sep 2012 15:29:12 +0000 (17:29 +0200)]
inet: fix getting the nameserver from _res state after res_init.
Fixes displaying the nameserver in busybox nslookup.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mischa Jonker [Fri, 22 Mar 2013 16:30:47 +0000 (17:30 +0100)]
libc: Fix common-generic stat.h for BE
Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Nathan Sidwell [Fri, 22 Mar 2013 16:48:51 +0000 (17:48 +0100)]
Fix some fragileness in dlopen/do_dlopen wrapper & worker pair.
do_dlopen contains __builtin_return_address to determine from
whence it was called, and uses that to determine which dynamic
object's data it should use to start the search. (In the bug I was
tracking, this related to whether the application's RPATH was used or
not.) For that to work, it has to have been inlined into the wrapper
function.
As it happens, it wasn't being inlined. That's an unfortunate compiler
behaviour, but it isn't wrong and shouldn't have caused dlopen to fail.
This patch changes things so the wrapper function determines the
return address, and passes it to the worker. If the worker's inlined,
the generated code should be exactly the same as before.
Signed-off-by: Nathan Sidwell <nathan@codesourcery.com>
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
Nathan Sidwell [Fri, 22 Mar 2013 16:46:52 +0000 (17:46 +0100)]
Fix a problem with scanning wide chars.
We found that the testcase
int
main (void)
{
wchar_t s[10];
memset (s, 0, sizeof (s));
int r = sscanf ("s", "%ls", s);
printf ("%d\n", r);
printf ("%ls\n", s);
return 0;
}
printed
0
<blankline>
rather than the expected
1
s
The problem was the enum in _scanf.c, which has had a 'CONV_m' value
inserted. The attached patch fixes the problem in __psfs_parse_spec by
not presuming a particular displacement between the two sets of
char-like conversion values. With this patch the above program produces
the expected output.
Signed-off-by: Nathan Sidwell <nathan@codesourcery.com>
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
Timo Teräs [Thu, 18 Jun 2009 06:55:46 +0000 (06:55 +0000)]
inet: do not filter responses in res_query
Fixes bug #5342
res_query was silently rejecting responses against T_ANY DNS
questions.
Remove the type-filtering from res_query altogether.
__dns_lookup is supposed to return the proper stuff that you asked
for (and only that).
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 17 Mar 2013 06:19:23 +0000 (07:19 +0100)]
inet: Fix LT{.old,} compilation due to res_iclose
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 17 Mar 2013 06:15:58 +0000 (07:15 +0100)]
LT.old: add missing prototypes
to silence warning
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 17 Mar 2013 06:14:04 +0000 (07:14 +0100)]
rpc: silence warning
Silence warning about shadowing wait
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 17 Mar 2013 06:04:46 +0000 (07:04 +0100)]
test: fix non-O checking
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 09:22:56 +0000 (10:22 +0100)]
test: add missing top_srcdir
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 09:17:41 +0000 (10:17 +0100)]
buildsys: remove calls to mktemp
Nowadays we should not be racy in this area anymore, so simplify
generating temporary build-files.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 09:06:32 +0000 (10:06 +0100)]
test: silence warning in skeleton
Some tests use fd, rename the one in the skeleton.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 09:04:10 +0000 (10:04 +0100)]
test: silence warning in testsuite.h
silence warnings about unused parameters
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 08:58:56 +0000 (09:58 +0100)]
test: update test-skeleton.c
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 08:54:02 +0000 (09:54 +0100)]
libubacktrace: use libgcc_s.h
for consistency
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 08:52:40 +0000 (09:52 +0100)]
libc: switch several users to unlikely()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 08:46:21 +0000 (09:46 +0100)]
inet: res_nclose: free user-buffer, not global _res
In res_iclose we were operating on the global _res even if called via
res_nclose where we are supposed to operate on the user provided
res_state.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 07:59:45 +0000 (08:59 +0100)]
test: dlopen: fix misplaced buildsys hunk
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 07:43:38 +0000 (08:43 +0100)]
buildsys: remove surplus slashes from test dir paths
cosmetics
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 07:41:52 +0000 (08:41 +0100)]
buildsys: tweak KCONFIG_CONFIG export
0c3eb2da578bc7ba2e74d240e3249dce62ec725e moved KCONFIG_CONFIG around and
that broke propagation of config-settings to the testsuite. Fix that.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 06:39:41 +0000 (07:39 +0100)]
test: cater for config
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 23 Feb 2013 06:38:36 +0000 (07:38 +0100)]
test: compile test{,_glibc} adjacent
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 18 Nov 2010 14:58:01 +0000 (14:58 +0000)]
metag: Add NPTL support
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 24 Mar 2011 11:37:25 +0000 (11:37 +0000)]
extra/locale: Mark __codeset_8_bit_t as packed for Meta
gen_ldc writes offsets into the __locale_mmap_t structure. This
relies on the host system having the same struct offsets as the
target. On Meta, the structs are always aligned to a multiple of
4 bytes, and for these targets it is required for the struct to
be packed so that it is more likely to match the host system
(typically x86 which does not align structs).
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Tue, 21 Sep 2010 12:43:19 +0000 (12:43 +0000)]
metag: Add support for loading shared objects into core memories.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 26 Nov 2009 10:20:01 +0000 (10:20 +0000)]
libm: Add support for the Meta architecture
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Tue, 5 Feb 2008 14:51:48 +0000 (14:51 +0000)]
Add support for the Meta architecture
Meta cores are 32-bit, hardware multithreaded, general purpose, embedded
processors which also feature a DSP instruction set, and can be found in
many digital radios. They are capable of running different operating
systems on different hardware threads, for example a digital radio might
run RTOSes for DAB decoding and audio decoding on 3 hardware threads,
and run Linux on the 4th hardware thread to manage the user interface,
networking etc. HTPs are also capable of running SMP Linux on multiple
hardware threads.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Tue, 2 Feb 2010 17:10:28 +0000 (17:10 +0000)]
ldd: Add MATCH_MACHINE definition for Meta
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Tue, 5 Feb 2008 14:49:08 +0000 (14:49 +0000)]
elf: Add ELF magic number and relocations for the Meta architecture
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 14 Mar 2013 12:21:26 +0000 (17:51 +0530)]
ldso: Fix Build warnings with common-generic ABI build
CC ldso/ldso/ldso.oS
In file included from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h:35:1: warning: "S_ISUID" redefined
In file included from ./include/bits/kernel_stat.h:10,
from ./ldso/include/dl-syscall.h:31,
from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./include/sys/stat.h:163:1: warning: this is the location of the
previous definition
In file included from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h:36:1: warning: "S_ISGID" redefined
In file included from ./include/bits/kernel_stat.h:10,
from ./ldso/include/dl-syscall.h:31,
from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./include/sys/stat.h:164:1: warning: this is the location of the
previous definition
-----------------------------------------------------------------
Cleanly seperated the legacy ABI vs. new ABI scenario.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 14 Mar 2013 12:21:25 +0000 (17:51 +0530)]
libpthread: linuxthreads.old: Allow building for no-legacy-syscalls ABI
Since NPTL port to an ARCH can be non-trivial, we must allow the legacy
pthread lib to be built for the common-generic syscall ABI
Note that only linuxthreads.old is allowed, since "newer" linuxthreads
relies on sysctl which the ABI no longer provides.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 14 Mar 2013 12:21:28 +0000 (17:51 +0530)]
libc/ipc: Make IPC_64 0 for common-generic ABI
This avoids having to define __IPC_64 to 0 in each arch using the ABI
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 14 Mar 2013 12:21:27 +0000 (17:51 +0530)]
fstat64: Fix Build warnings with common-generic ABI build
CC libc/sysdeps/linux/common/fstat64.os
In file included from libc/sysdeps/linux/common/fstat64.c:16:
libc/sysdeps/linux/common/xstatconv.h:28: warning: 'struct kernel_stat'
declared inside parameter list
libc/sysdeps/linux/common/xstatconv.h:28: warning: its scope is only
this definition or declaration, which is probably not what you want
libc/sysdeps/linux/common/fstat64.c: In function 'fstat64':
libc/sysdeps/linux/common/fstat64.c:33: warning: passing argument 2 of
'__syscall_fstat64' from incompatible pointer type
libc/sysdeps/linux/common/fstat64.c:18: note: expected 'struct stat *'
but argument is of type 'struct stat64 *'
-------------------------------------------------------------------
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 14 Mar 2013 12:21:24 +0000 (17:51 +0530)]
leek: if lseek syscall is not available, use lseek64 even for !LFS
With Busybox and uClibc - both built w/o LFS, this caused ash to be
completely broken, as lseek was simply returning error.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 14 Mar 2013 12:21:23 +0000 (17:51 +0530)]
utimes: Export utimensat based utimes
sys/time.h has libc_hidden_proto(utimes) which generates the hidden
"__GI_utimes" symbol reference, and common/utimes.c has a
libc_hidden_def(utimes) which generates the exported "utimes" alias.
As part of no-legacy-syscall kernel ABI, Commit
80dc2ed05
"utimes: Use utimensat if arch does not have the utimes syscall"
introduced a new wrapper, but missed the corresponding libc_hidden_def,
causing Busybox (1.20.0) link to fail (for ARC).
Also don't generate a STUB, in that case.
---------------->8-------------------
....
touch.c:(.text.touch_main+0xdc): undefined reference to `utimes'
touch.c:(.text.touch_main+0x114): undefined reference to `utimes'
libbb/lib.a(copy_file.o): In function `copy_file':
copy_file.c:(.text.copy_file+0x446): undefined reference to `utimes'
collect2: ld returned 1 exit status
---------------->8-------------------
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Sat, 9 Mar 2013 06:11:08 +0000 (11:41 +0530)]
LT{,.old}: include stddef.h for size_t
A user application built with -D_POSIX_C_SOURCE=200112L and
#include signal.h, yields following compilation error:
------------------->8-----------------------------
arc-linux-uclibc-gcc -D_POSIX_C_SOURCE=200112L hello.c
In file included from
/opt/INSTALL/lib/gcc/arc-linux-uclibc/4.4.7/../../../../arc-linux-uclibc/sys-include/signal.h:429,
from hello.c:1:
/opt/INSTALL/lib/gcc/arc-linux-uclibc/4.4.7/../../../../arc-linux-uclibc/sys-include/bits/pthreadtypes.h:48:
error: expected specifier-qualifier-list before 'size_t'
------------------->8-----------------------------
The fix is to make sure size_t is explicitly provided to pthreadtype.h
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Mon, 25 Feb 2013 09:41:25 +0000 (09:41 +0000)]
buildsys: Add missing $(SYMBOL_PREFIX) to symbol names
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Sun, 3 Mar 2013 11:48:20 +0000 (11:48 +0000)]
libpthread: Remove useless .cvsignore files
Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Tue, 12 Feb 2013 13:44:25 +0000 (13:44 +0000)]
nptl/allocatestack.c: Fix stack mprotect alignment for STACK_GROWS_UP
mprotect() expects the first argument to be aligned to a page boundary.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Tue, 15 Jan 2013 13:47:31 +0000 (13:47 +0000)]
libc/pause: Enable pause_nocancel for arches without __NR_pause
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Xi Wang [Wed, 20 Feb 2013 17:45:45 +0000 (12:45 -0500)]
nice: fix overflow checking in int_add_no_wrap()
In C, signed integer overflow is undefined behavior. Many compilers
optimize away checks like `a + b < a'.
Use safe precondition testing instead.
Signed-off-by: Xi Wang <xi@mit.edu>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 20 Feb 2013 09:09:03 +0000 (10:09 +0100)]
inet: remove noreturn attribute from res_nclose
Partially revert
e9af4dfbd328e9f3bba235fdb2d1027dd2dbbcde
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 19 Feb 2013 07:43:39 +0000 (08:43 +0100)]
scripts: remove CVS header from getent
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 25 Oct 2012 11:04:02 +0000 (12:04 +0100)]
libc/ipc: Allow architectures to define their own __IPC_64 macro
New architectures don't define ARCH_WANT_IPC_PARSE_VERSION in their kernel.
This means that every cmd passed to semctl,msgctl and shmctl is IPC_64 by
default. For these architectures we need to define __IPC_64 as 0. Existing
architectures are not affected by this change.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 15:25:32 +0000 (16:25 +0100)]
ldso: Use newer syscalls if arch does not have the deprecated syscalls
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 13:26:07 +0000 (14:26 +0100)]
open: Use openat if arch does not have the open syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Fri, 12 Oct 2012 10:42:22 +0000 (11:42 +0100)]
not-cancel.h: Use openat if arch does not have the open syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Fri, 12 Oct 2012 10:28:35 +0000 (11:28 +0100)]
open64: Use openat if arch does not have the open syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 11:56:48 +0000 (12:56 +0100)]
fcntl: Use fcntl64 is arch does not have the fcntl syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 18 Oct 2012 15:51:43 +0000 (16:51 +0100)]
fstatfs64: Prefer fstatfs64 system call instead of __libc_fstatfs
Using __libc_fstatfs for fstatfs64 adds a small delay as it needs to
use a 32-bit data structure to get the file info and them pass them to
the 64-bit data structure which was given as a fstatfs64 argument. Using
the system call directly should make the entire process much faster.
Also fix the arguments for fstatfs64. It takes three arguments
(see fs/fstatfs.c in Linux kernel sources) so despite what the manpage
says, the size of the buffer needs to be passed as the second argument
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 10:58:30 +0000 (11:58 +0100)]
fstatfs: Add __libc_fstatfs wrapper
New architectures don't have fstatfs anymore, so we use a wrapper for
__libc_fstatfs which will use fstatfs64 internally. The interface however
needs to remain the same (i.e accepting a struct statfs as a second
argument) for backwards compatibility
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 11:15:50 +0000 (12:15 +0100)]
stat: Use fstatat64 if arch does not have the stat syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Fri, 12 Oct 2012 10:20:12 +0000 (11:20 +0100)]
ustat: Add ustat stub for arches that don't have the ustat system call
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 11:30:56 +0000 (12:30 +0100)]
lstat64: Use fstatat64 if arch does not have the lstat64 syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 11:24:12 +0000 (12:24 +0100)]
lstat: Use fstatat64 if arch does not have the lstat syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 11:18:54 +0000 (12:18 +0100)]
stat64: Use fstatat64 if arch does not have the stat64 syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Tue, 11 Dec 2012 12:51:33 +0000 (12:51 +0000)]
fstatat{64}: No conversion code is needed for new architectures
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 10:45:45 +0000 (11:45 +0100)]
fstatat64: Use newfstatat only for 64-bit operations
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 10:44:44 +0000 (11:44 +0100)]
fstatat: Use newfstatat only for 64-bit operations
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Mon, 14 Jan 2013 15:57:03 +0000 (15:57 +0000)]
fstat: Use fstat64 if arch does not have the fstat syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 23 Jan 2013 09:12:46 +0000 (09:12 +0000)]
libc/statfs64: Skip conversion code for new architectures
Fixes the following tests in LTP
statfs02_64 ( test case #5 )
The purpose of this test is to pass an invalid pointer to the statfs64
syscall and check if the kernel returns EFAULT or not. However,
uClibc creates a new statfs struct which is then passed to the kernel.
As a result of which, the kernel returns 0 because the newly created
statfs structure is valid. But, when copying the contens of the new
pointer to the old userspace one, the uClibc segfauls because the old
pointer is invalid. Old architectures are doomed to suffer by this
problem but new architectures can use the statfs64 syscall directly
so that the userspace pointer is passed directly to the kernel and get
the correct errno at the end.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 10:38:44 +0000 (11:38 +0100)]
statfs: Use statfs64 if arch does not have the statfs syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 10:30:59 +0000 (11:30 +0100)]
getdents: Use getdents64 if arch does not have the getdents syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Mon, 21 Jan 2013 10:59:14 +0000 (10:59 +0000)]
lseek: Use lseek64 is arch does not have the lseek syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 10:20:42 +0000 (11:20 +0100)]
sendfile: Use sendfile64 if arch does not have the sendfile syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 10:10:50 +0000 (11:10 +0100)]
truncate: Use truncate64 if arch does not have the truncate syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 10:08:28 +0000 (11:08 +0100)]
ftruncate: Use ftruncate64 if arch does not have the ftruncate syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 10:01:37 +0000 (11:01 +0100)]
fork: Use clone if arch does not have the fork syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 09:27:44 +0000 (10:27 +0100)]
vfork: Use clone if arch does not have the vfork syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 09:51:33 +0000 (10:51 +0100)]
utime: Use utimensat if arch does not have the utime syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 09:23:19 +0000 (10:23 +0100)]
inotify_init: Use inotify_init1 if inotify_init syscall is not defined
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 31 Oct 2012 16:02:49 +0000 (16:02 +0000)]
epoll: Use epoll_pwait if arch does not have the epoll_wait syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 09:12:24 +0000 (10:12 +0100)]
epoll: Use epoll_create1 if arch does not have the epoll_create syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 15:24:43 +0000 (16:24 +0100)]
pipe: Use pipe2 if arch does not have the pipe syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 15:06:57 +0000 (16:06 +0100)]
utimes: Use utimensat if arch does not have the utimes syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:57:41 +0000 (15:57 +0100)]
symlink: Use symlinkat if arch does not have the symlink syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:50:28 +0000 (15:50 +0100)]
readlink: Use readlinkat if arch does not have the readlink syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:17:10 +0000 (15:17 +0100)]
rename: Use renameat if arch does not have the rename syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:10:27 +0000 (15:10 +0100)]
mkdir: Use mkdirat if arch does not have the mkdir syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:09:53 +0000 (15:09 +0100)]
lchown: Use fchownat if arch does not have the lchown syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:05:37 +0000 (15:05 +0100)]
rmdir: Use unlinkat if arch does not have the rmdir syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>