| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Also add -Werror=old-style-definition to enforce new code.
Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* libshouldbeinlibc/wire.c: Include <mach/vm_param.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* wire.c: Use ElfW(TYPE) in place of Elf32_TYPE throughout.
|
|
|
|
| |
* wire.c (map_extent): Add dead return stmt to silence gcc warning.
|
|
|
|
| |
* wire.c: Include <error.h>.
|
|
|
|
|
| |
* wire.c (map_extent): Pass second arg of RTLD_NOLOAD to dlopen.
(RTLD_NOLOAD): Define macro to zero if undefined.
|
|
|
|
| |
* wire.c (map_extent): Rewrite using dlsym on library's _end symbol.
|
|
|
|
| |
* wire.c: Use a weak reference to _DYNAMIC.
|
|
|
|
|
| |
* wire.c (map_extent): Use p_memsz instead of p_filesz.
(loaded): Return zero if _DYNAMIC has address zero (i.e., static link).
|
| |
|
| |
|
|
|
|
| |
this library.
|
|
|