aboutsummaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/wire.h
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-08-11 18:10:15 +0200
committerJustus Winter <justus@gnupg.org>2017-08-11 22:07:11 +0200
commit01ced1f5856659f4f457f39c270dd10f64ccaab8 (patch)
tree1b57c0aa31276f7b596d7eca20533a7017a8576a /libshouldbeinlibc/wire.h
parente2823ba8f994292ecb92b83dfa3174e6f11c92fd (diff)
downloadhurd-01ced1f5856659f4f457f39c270dd10f64ccaab8.tar.gz
hurd-01ced1f5856659f4f457f39c270dd10f64ccaab8.tar.bz2
hurd-01ced1f5856659f4f457f39c270dd10f64ccaab8.zip
libshouldbeinlibc: Fix wiring code.
* 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.
Diffstat (limited to 'libshouldbeinlibc/wire.h')
-rw-r--r--libshouldbeinlibc/wire.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libshouldbeinlibc/wire.h b/libshouldbeinlibc/wire.h
index 6783cc50..2f310cf8 100644
--- a/libshouldbeinlibc/wire.h
+++ b/libshouldbeinlibc/wire.h
@@ -20,7 +20,7 @@
/* Wire down all the text and data (including from shared libraries)
for the current program. */
-void wire_task_self (void);
+error_t wire_task_self (void);
/* Wire down all memory currently allocated at START for LEN bytes. */
-void wire_segment (vm_address_t start, vm_size_t len);
+error_t wire_segment (vm_address_t start, vm_size_t len);