Age | Commit message (Collapse) | Author |
|
This adds some DSBT index sanity checks to the runtime linker. It
catches libraries which have no index (index 0) and libraries which
try to use an already used index.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
|
|
This adds support for the TI C6X family of processors.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Aurelien Jacquiot <a-jacquiot@ti.com>
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
|
|
On C6X, the stack pointer points to a word that is not part of the current
function's stack frame. It may be overwritten by callees. Take this into
account when creating the stack for a cloned thread.
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
|
|
This adds support for DSBT ELF to ld.so. This uses loadmaps like FD-PIC.
Some code is added in ld.so to initialize the DSBT tables, and there's
also a new target macro FINISH_BOOTSTRAP_RELOC.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Aurelien Jacquiot <a-jacquiot@ti.com>
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
|
|
This adds support for a new binary format, DSBT ELF, to the Makefiles.
Every shared library is assigned a DSBT index, and the link.so macro is
adjusted to ensure the correct linker argument is passed.
Configuration and ldso support will follow in separate commits.
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
make xlocale.h a dummy, locale_t is needed without it and
uClibc_locale.h is already included by locale.h
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
IS_IN_LIBPTHREAD should be IS_IN_libpthread instead.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
guard the prototype with _LIBC, it is only for internal use
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Add support to use errno.h in ldso.
Move __set_errno into _LIBC guard.
Remove uClibc_errno.h, unused.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Function prototypes are visible whenever IPV6 option is enabled.
Structures and constants are visible either if IPV6 is enabled
or STRICT_HEADERS is disabled.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Sync some headers with glibc.
realpath is an XSI extension in SuSv4, add back guard and update comment,
since it seems to allow != NULL in second arg.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
When compiled with -std=gnu99/c99 __GNUC_GNU_INLINE__ is not defined
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Simplify guard of uClibc internals, since _LIBC sections are removed on install.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Remove libc-internal.h on install, I think internal is a typo.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
STRICT_HEADERS
Remove ucontext.h if SUSV4_LEGACY is not set and fix it's references.
Guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS.
Disable sigstack function prototype, it is not provided by uClibc.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
we already remove the printf.h header if this option is disabled
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Remove error handling from getegid/getgid/geteuid/getuid/getppid/getpid/getpgrp
Use strong_alias if fallbacks are needed
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Do not depend on ADVANCED REALTIME for mq_send/mq_receive
Added stubs implementation based on libc's stubs.c
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
We use enosys_stub only in this file so make it static
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Avoid using strong_alias in ssp, some archs dislike it.
Make stack_chk_guard static.
Export __stack_smash_handler only if compatibility option is enabled.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Add some missing prototypes
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
NPTL build did not use the correct bits/sigthread.h, use a common version
avoiding this.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Add some missing prototypes
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Style update avoiding compile warnings
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Avoid compile warnings about the use of undefined constants
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Try to fix duplicated slashes in the generated lib*.so files
and make sure that on installation the *bin directories are
really created (avoid the misbehaviour of creating usrbin dir).
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Initialize tls_tpnt to NULL on all archs instead of 0.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Disable some build warnings in utils.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
disable IPv6 related stuff if feature is disabled.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Add config option to disable the visibility of structures/constants
that should not be visible unless a feature is enabled.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
include features.h to make the next ifdef work.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Use ADDR_ALIGN to align the minvma when loading shared libraries instead
of the hard coded 0xffffU value.
This fixes teh stand/alone support on ARM as reported in bug #3133.
Signed-off-by: Sven Ola <sven-ola@gmx.de>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
ARM disables by default the support for ASM CFI directives.
Anyway using an old version of binutils that does not support some new
pseudo-op, the build fails as below:
AS libpthread/nptl/sysdeps/unix/sysv/linux/close.oS
libpthread/nptl/sysdeps/unix/sysv/linux/close.S: Assembler messages:
libpthread/nptl/sysdeps/unix/sysv/linux/close.S:9: Error: unknown pseudo-op: `.cfi_sections'
The problem is that the .cfi_sections pseudo should be wrapped by a macro
that expands to nothing when the CFI is off.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
CC: Khem Ray <ray.khem@gmail.com>
|
|
Because the nommu address space is flat, and the application stack can
literally be located anywhere, we cannot rely on the assumptions that the
mmu port gets away with. Namely, that the first thread's stack lives at
the top of memory and nothing will be created above it.
Currently, the code rounds the current stack up a page and sets that as
the "top" of the stack, and then marks the "bottom" of the stack as "1".
Then as new threads are created, this assumption is further refined by
slowly backing off the "bottom" when a new stack is created within the
range of the initial stack.
Simple ascii example (tid0 is the initial thread):
1 thread:
[bos tid0 stack tos]
2 threads:
[ tid0 stack ]
[tid1 stack]
3 threads:
[ tid0 stack ]
[tid1 stack]
[tid2 stack]
As you can kind of see, this algorithm operates on one basic assumption:
the initial top of stack calculation is the absolute top of the stack.
While this assumption was fairly safe in the original nommu days of yore
where the only file format was FLAT (which defaults to a 4KiB stack --
exactly 1 page), and memory was fairly tight, we can see that this falls
apart pretty quickly as soon as the initial stack is larger than a page.
The issue that crops up now is simple to hit: start an application with
an 8KiB stack, execute some functions that put pressure on the stack so
that it exceeds 4KiB, then start up some threads. The initial tos will
be rounded up by a page, but this is actually the middle of the stack.
Now when the initial thread returns from its functions (thus unwinding
the stack) and tries to call something which calls back into libpthread,
the thread_self() func fails to detect itself as the initial thread as
the current stack is now above the tos. The __pthread_find_self() func
kicks in, walks all the thread arrays, fails to find a hit, and then
walks into uninitialized memory for the thread descriptor. Use of this
garbage memory has obvious results -- things fall down & go boom.
To address this, I extend the current algorithm to automatically scale
back both the bottom and the top stack limits of the initial thread.
We use the current stack pointer at "thread boot time" only as a single
known point. The initial thread stack bottom is set to the bottom of
memory and the initial thread stack top is set to the top of memory.
Then as we create new stack threads, we figure out whether the new stack
is above or below the single known good address, and then scale back
either the tos or the bos accordingly.
Reviewed-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
We want to access the frame pointer, so do so directly rather than
"overflowing" the pregs array and ending up at the fp member.
This fixes the Blackfin build warnings:
libpthread/linuxthreads.old/ptlongjmp.c: In function 'pthread_cleanup_upto':
libpthread/linuxthreads.old/ptlongjmp.c:35: warning: array subscript is above array bounds
libpthread/linuxthreads.old/ptlongjmp.c:56: warning: array subscript is above array bounds
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The printf precision takes an integer, not a size_t. Otherwise we get:
libc/misc/internals/tempname.c: In function '___path_search':
libc/misc/internals/tempname.c:116: warning:
field precision should have type 'int', but argument 3 has type 'size_t'
field precision should have type 'int', but argument 5 has type 'size_t'
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|