summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
* Richard Sandiford writes:Mike Frysinger2007-01-292-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | However, retesting on m68k showed up a problem that had appeared in uClibc since the last time I tried. Specifically, revision 15785 did: -#define HEAP_GRANULARITY (sizeof (HEAP_GRANULARITY_TYPE)) +#define HEAP_GRANULARITY (__alignof__ (HEAP_GRANULARITY_TYPE)) -#define MALLOC_ALIGNMENT (sizeof (double)) +#define MALLOC_ALIGNMENT (__alignof__ (double)) The problem is that (a) MALLOC_HEADER_SIZE == MALLOC_ALIGNMENT (b) the header contains a size value of type size_t (c) sizeof (size_t) is 4 on m68k, but... (d) __alignof__ (double) is only 2 (the largest alignment used on m68k) So we only allocate 2 bytes for the 4-byte header, and the least significant 2 bytes of the size are in the user's area rather than the header. The patch below fixes that problem by redefining MALLOC_HEADER_SIZE to: MAX (MALLOC_ALIGNMENT, sizeof (size_t)) (but without the help of the MAX macro ;)). However, we really would like to have word alignment on Coldfire. It makes a big performance difference, and because we have to allocate a 4-byte header anyway, what wastage there is will be confined to the end of the allocated block. Any wastage will also be limited to 2 bytes per allocation compared to the current alignment. I've therefore used the __aligned__ type attribute to create a double type that has at least sizeof (size_t) bytes of alignment. I've introduced a new __attribute_aligned__ macro for this. It might seem silly protecting against old or non-GNU compilers here, but the extra alignment is only an optimisation, and having the macro is more in the spirit of the other attribute code.
* - s/if USE___THREAD/if defined USE___THREAD && USE___THREAD/gBernhard Reutner-Fischer2007-01-291-2/+2
|
* pull in unistd.h for syscall() prototypeMike Frysinger2007-01-291-0/+1
|
* fix from Atsushi Nemoto for displaying of 64bit typesMike Frysinger2007-01-291-1/+1
|
* fix from Roman Kononov for reading in of 64bit typesMike Frysinger2007-01-291-1/+1
|
* sync some fixes from glibcMike Frysinger2007-01-291-3/+7
|
* sync with glibc as pointed out by Bernhard FischerMike Frysinger2007-01-281-3/+2
|
* - commentary typo fixBernhard Reutner-Fischer2007-01-281-1/+2
|
* initial waitid() implementationMike Frysinger2007-01-281-0/+15
|
* need string.h for memset()Mike Frysinger2007-01-281-0/+1
|
* make sure we clear out the buffer so that random garbage on the stack doesnt ↵Mike Frysinger2007-01-281-2/+6
| | | | screw us up
* Paul Brook writes:Mike Frysinger2007-01-281-3/+4
| | | | | The patch below tweaks the ARM nommu startup code so that doubleword stack alignment is preserved. This is required on EABI targets.
* fix from blackfin repo: Jie Zhang writes: update __kernel_ipc_pid_t, ↵Mike Frysinger2007-01-271-3/+3
| | | | __kernel_uid_t and __kernel_gid_t types to match actual kernel types
* fix from blackfin repo: Jie Zhang writes: Passing NULL as the second ↵Mike Frysinger2007-01-271-6/+1
| | | | argument to utimes () if the second argument to utime () is NULL as the kernel will take care of getting/setting current time
* fix from Bryan Wu: return NULL upon error, not the NULL stringMike Frysinger2007-01-241-4/+3
|
* Recognize _SC_MONOTONIC_CLOCK in sysconf() even if __NR_clock_getresPeter Kjellerstedt2007-01-221-2/+2
| | | | is not defined.
* - repair misplaced #endif that got introduced in r17410. Fixes compilation.Bernhard Reutner-Fischer2007-01-211-1/+1
|
* Disable declarations for NPTL."Steven J. Hill"2007-01-201-0/+2
|
* The case for _SC_MONOTONIC_CLOCK should only exist if 'clock_getres' does."Steven J. Hill"2007-01-201-0/+2
|
* - Trim superfluous trailing whitespace. No obj-code changes.Bernhard Reutner-Fischer2007-01-201-10/+8
|
* Peter Mazinger pointed out that my last commit was faulty.Joakim Tjernlund2007-01-111-1/+1
| | | | This should fix it.
* merge from blackfin.uclinux.org: AdjustMike Frysinger2007-01-101-17/+10
| | | | crt1.S so that __uClibc_main is called properly
* Fix SEGV for static builds in exit() path.Joakim Tjernlund2007-01-103-2/+27
| | | | Leave the now obsolete libc/misc/pthread dir in for now.
* need to keep __check_rhosts_file exported for proper rhost controlMike Frysinger2007-01-101-1/+5
|
* sync with upstream blackfin.uclinux.orgMike Frysinger2007-01-101-94/+94
|
* Aurelien Jacobs writes:Joakim Tjernlund2007-01-091-1/+1
| | | | | | | | | | | | | | | | | | After our last update a new compilation breakage appeared when compiling gcc: /home/aurel/geex/geexbox/build.i386/toolchain/i386-pc-linux-uclibc/sysroot/usr/include/bits/uClibc_stdio.h:346: error: expected initializer before 'attribute_hidden' Some investigations revealed that the following changeset is responsible for this breakage: http://uclibc.org/cgi-bin/viewcvs.cgi/trunk/uClibc/libc/sysdeps/linux/common/bits/uClibc_stdio.h?rev=16801&r1=16793&r2=16801&diff_format=h Reverting just one hunk of this changeset fixed the problem us. I'm not sure this is the right fix, but please see attached patch. Look good to me.
* Support SecurePLTs for PowerPC. You need a toolchain that supportsJoakim Tjernlund2007-01-055-15/+23
| | | | | | config option --enable-secureplt. The assembler must also supports R_PPC_REL16* relocations. gcc 4.1.1 and binutils 2.17 is known to do this.
* Atle Nissestad writes: The attached patch fixes compilation of the current ↵Mike Frysinger2007-01-056-44/+312
| | | | svn on the nios2 platform, and updates the crt1/n/i.S files to get CTOR/DTOR-support to work.
* - provide a hidden_def for fputc_unlocked that is aliased to __fputc_unlocked.Bernhard Reutner-Fischer2006-12-221-0/+2
| | | | Fixes undefined references to __fputc_unlocked when calling fputc().
* Paul Brook writes:Mike Frysinger2006-12-201-0/+1
| | | | | | | | | | When building an arm-uclinux toolchain withthreading disabled I get: libc/stdio/getchar.c:26: error: 'getchar' aliased to undefined symbol 'getchar_unlocked' It looks like it's missing libc_hidden_def(getchar_unlocked). Patch below fixes this.
* rename local "brk" var so it doesnt namespace collide with the brk() functionMike Frysinger2006-12-171-18/+18
|
* Patch from Bernhard Fischer:Eric Andersen2006-12-152-4/+4
| | | | fix compilation if PUTC_MACRO and/or GETC_MACRO is turned off
* fix building when __NR_sigalstack does not existMike Frysinger2006-12-141-0/+3
|
* if __NR_lseek is not defined, then we fall back to calling the 64bit lseekMike Frysinger2006-12-141-0/+9
|
* Fix/disable locking when pthreads is disabledEric Andersen2006-12-121-0/+13
|
* sort out a few issues that show up on mipsEric Andersen2006-12-123-23/+37
|
* mostly revert the locking changes for 'malloc', as the implementationEric Andersen2006-12-112-8/+10
| | | | | | | | does not easily lend itself to becoming complete pthread cancelation safe without first investing in some deep and serious thought... The other malloc implementations are pthread cancelation safe, and this one is mostly used for uClinux, where the lack is at least less likely to be a common problem.
* fix building when pthread support is disabledMike Frysinger2006-12-111-1/+1
|
* dont try and compile if the MMU is disabledMike Frysinger2006-12-111-0/+4
|
* need endian.h for __LONG_LONG_PAIR() macroMike Frysinger2006-12-111-0/+1
|
* cleanup styleMike Frysinger2006-12-111-36/+36
|
* create new menu so people can select what format they wish to build uClibcMike Frysinger2006-12-114-14/+14
|
* these weaks are also needed in libc.so for the time beingEric Andersen2006-12-091-1/+1
|
* oops, use __pthread_mutex_unlock() not pthread_mutex_unlock()Eric Andersen2006-12-091-1/+2
|
* Add missing sys/types.h headerEric Andersen2006-12-096-6/+12
|
* silence a lot of warnings and fix a few genuine bugs while I'm at it.Eric Andersen2006-12-095-8/+44
|
* Richard Sandiford writes: add support for init/fini arrays in shared flat ↵Mike Frysinger2006-12-0813-55/+276
| | | | libraries
* seems this is the newfangled way to tell folks this stuffEric Andersen2006-12-081-1/+1
| | | | is really really and we mean it this time, for uClibc only
* Take Mike Frysinger's comments into account -- make certain that userEric Andersen2006-12-08198-283/+176
| | | | | applications stop using _syscall#() and use syscall() instead. Cleanup internal handling of syscall includes to use the correct header file.
* add some warnings to archs that need a bit of attentionEric Andersen2006-12-084-0/+4
|