summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/malloc.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r264346 (by alc):kib2015-04-121-20/+9
| | | | | Pass MAP_ALIGNED_SUPER to allocate the whole dso region if its text is large enough for the superpage mapping.
* MFC: r262136brueffer2014-02-241-5/+1
| | | | | | | Remove the 3rd clause ("advertising clause") of the BSD license as permitted by the University of Berkeley on July 22, 1999. Reviewed by: imp
* Remove the fragments which are not needed on FreeBSD. The caltechkib2012-03-221-18/+0
| | | | | | | malloc hardly would ever be updated. Reviewed by: bde, kan MFC after: 2 weeks
* Rtld links with the specially built pic static libc library to get somekib2011-08-241-20/+5
| | | | | | | | | | | | | | | | | C runtime services, like printf(). Unfortunately, the multithread-safeness measures in the libc do not work in rtld environment. Rip the kernel printf() implementation and use it in the rtld instead of libc version. This printf does not require any shared global data and thus is mt-safe. Systematically use rtld_printf() and related functions, remove the calls to err(3). Note that stdio is still pulled from libc due to libmap implementaion using fopen(). This is safe but unoptimal, and can be changed later. Reported and tested by: pgj Diagnosed and reviewed by: kan (previous version) Approved by: re (bz)
* Use the newly provided aux vectors to get pagesize and osreldate information.kib2010-08-171-1/+22
| | | | | | | | | | | | | | | | | | Use local version of getpagesize(), rtld_getpagesize() in private allocator. Override the __getosreldate() previously fetched from libc_pic.a with local version that uses aux value if present. Note that __getosreldate() is used by rtld indirectly, by mmap(2) libc wrapper. To be able to utilize aux, split digest_dynamic() for use by init_rtld() into two parts, where the first one does not call malloc(), and the second part uses it. init_rtld() is able to initialize global variables before digest_dynamic2() calls. In particular, pagesize and osreldate are set up from the aux values. Now, rtld avoids (two) sysctl calls in startup. Tested by: marius (sparc64) MFC after: 1 month
* In preparation for a new malloc implementation:jasone2006-01-121-0/+16
| | | | | | | | | | | | | * Add posix_memalign(). * Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in rtld-elf in order to make the loader happy (even though calloc() isn't used in rtld-elf). * Add _malloc_prefork() and _malloc_postfork(), and use them instead of directly manipulating __malloc_lock. Approved by: phk, markm (mentor)
* Very minor style nit: sort include files alphabetically.imp2003-08-221-1/+1
|
* Fix signed/unsigned comparison warnings.obrien2003-05-041-4/+4
|
* Add missing include files I forgot about in previous commit.kan2003-02-131-0/+2
|
* Remove /usr/lib/elf from a default search path.kan2003-02-131-1/+16
| | | | | | Move xprintf to malloc.c, it is only used there. Make static. Submitted by: phantom
* Include stddef.h for NULL definition, rather than rolling our own here.imp2002-08-211-2/+1
| | | | Reviewed by: jdp
* Change brk's prototype from char *brk(const char *) to int brk(const void *)dwmalone2002-01-241-1/+0
| | | | | | | | | | | | | | | and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t). This makes us more consistant with NetBSD and standards which include these functions. Bruce pointed out that ptrdiff_t would probably have been better than intptr_t, but this doesn't match other implimentations. Also remove local declarations of sbrk and unnecessary casting. PR: 32296 Tested by: Harti Brandt <brandt@fokus.gmd.de> MFC after: 1 month
* Add `_PATH_DEVZERO'.obrien2000-12-091-2/+3
| | | | Use _PATH_* where where possible.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add alpha support.dfr1998-09-041-5/+6
| | | | | Submitted by: John Birrell <jb@cimlogic.com.au> (with extra hacks by me) Obtained from: Probably NetBSD
* Import the ELF dynamic linker. This is the ElfKit version withjdp1998-03-071-0/+485
quite a few enhancements and bug fixes. There are still some known deficiencies, but it should be adequate to get us started with ELF. Submitted by: John Polstra <jdp@polstra.com>
OpenPOWER on IntegriCloud