aboutsummaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/wire.c
Commit message (Collapse)AuthorAgeFilesLines
* wire_task_self: Simplify implementationSamuel Thibault2021-12-301-83/+1
| | | | | | | | In the dynamic case, loaded() doesn't actually manage to get maps, and in the static case the _start, _etext, __data_start, _edata symbols are not actually precise, and miss some pages. So let's just call wire_segment_internal on the whole addressing space, vm_region tells us which parts are actually mapped to make it efficient enough.
* Add missing includeSamuel Thibault2018-03-051-0/+1
| | | | * libshouldbeinlibc/wire.c: Include <mach/vm_param.h>.
* libshouldbeinlibc: Fix wiring code.Justus Winter2017-08-111-49/+95
| | | | | | | | | | | | | | * libshouldbeinlibc/wire.c (statically_linked): New function. (loaded): Remove check. (wire_segment_internal): Fix error handling. Be smarter about the wiring, inspired by the mach-defpager code. (wire_segment): Fix error handling. (wire_task_self): Fix error handling. Distinguish between static binaries and dynamic binaries without DT_DEBUG or link map. When we don't have a map, fall back to wiring the whole space. Wire future allocations. * libshouldbeinlibc/wire.h (wire_task_self): Return error_t. (wire_segment): Likewise.
* Rename variables with the name "error" to "err".Justus Winter2014-01-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The canonical name for variables of the type error_t is err. There are, however, places where the variable is called error instead. This is unfortunate, as this shadows the error function. Rename such variables to err. For reference, this is accomplished using the following semantic patch: @@ expression E; @@ -error_t error = E; +error_t err = E; <... -error +err ...> @@ @@ -error_t error; +error_t err; <... -error +err ...> * libdiskfs/dir-link.c: Rename error to err. * libdiskfs/dir-unlink.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libdiskfs/file-get-transcntl.c: Likewise. * libdiskfs/file-set-trans.c: Likewise. * libdiskfs/fsys-getroot.c: Likewise. * libshouldbeinlibc/wire.c: Likewise.
* Clean up the included header filesJustus Winter2013-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * libihash/ihash.c: Clean up the included header files. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/canon-host.c: Likewise. * libshouldbeinlibc/fsysops.c: Likewise. * libshouldbeinlibc/idvec-auth.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/idvec.h: Likewise. * libshouldbeinlibc/localhost.c: Likewise. * libshouldbeinlibc/maptime.c: Likewise. * libshouldbeinlibc/nullauth.c: Likewise. * libshouldbeinlibc/portxlate.c: Likewise. * libshouldbeinlibc/shared-dom.c: Likewise. * libshouldbeinlibc/ugids-argp.c: Likewise. * libshouldbeinlibc/ugids-auth.c: Likewise. * libshouldbeinlibc/ugids-imply.c: Likewise. * libshouldbeinlibc/ugids-merge.c: Likewise. * libshouldbeinlibc/ugids-subtract.c: Likewise. * libshouldbeinlibc/ugids-verify-auth.c: Likewise. * libshouldbeinlibc/ugids-verify.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libshouldbeinlibc/ugids.h: Likewise. * libshouldbeinlibc/wire.c: Likewise.
* 2002-05-08 Roland McGrath <roland@frob.com>Roland McGrath2002-05-081-4/+4
| | | | * wire.c: Use ElfW(TYPE) in place of Elf32_TYPE throughout.
* 2001-02-25 Roland McGrath <roland@frob.com>Roland McGrath2001-02-261-2/+6
| | | | * wire.c (map_extent): Add dead return stmt to silence gcc warning.
* 2000-10-30 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2000-10-301-0/+1
| | | | * wire.c: Include <error.h>.
* 2000-10-29 Roland McGrath <roland@redhat.sf.frob.com>Roland McGrath2000-10-291-1/+4
| | | | | * wire.c (map_extent): Pass second arg of RTLD_NOLOAD to dlopen. (RTLD_NOLOAD): Define macro to zero if undefined.
* 2000-10-29 Roland McGrath <roland@frob.com>Roland McGrath2000-10-291-5/+20
| | | | * wire.c (map_extent): Rewrite using dlsym on library's _end symbol.
* 1999-10-29 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-10-291-0/+2
| | | | * wire.c: Use a weak reference to _DYNAMIC.
* 1999-08-23 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-09-131-14/+16
| | | | | * wire.c (map_extent): Use p_memsz instead of p_filesz. (loaded): Return zero if _DYNAMIC has address zero (i.e., static link).
* *** empty log message ***Thomas Bushnell1996-07-311-1/+0
|
* (wire_segment_internal):Michael I. Bushnell1996-04-111-1/+9
|
* Add a weak reference to _start, so we don't have to recompile all users ofMiles Bader1996-03-261-2/+1
| | | | this library.
* Initial revisionMichael I. Bushnell1996-03-251-0/+153