From 40544765c02716f492bff51256d707a8e80e4b97 Mon Sep 17 00:00:00 2001 From: tkchia Date: Wed, 19 Oct 2022 22:05:49 +0000 Subject: [PATCH] [metal] Clarify comment in libc/calls/metalfile.c --- libc/calls/metalfile.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libc/calls/metalfile.c b/libc/calls/metalfile.c index 5188ff968..8dcbdd1e9 100644 --- a/libc/calls/metalfile.c +++ b/libc/calls/metalfile.c @@ -54,7 +54,12 @@ textstartup void InitializeMetalFile(void) { if (IsMetal()) { /* * Copy out a pristine image of the program — before the program might - * decide to modify its own .data section. Do this only if needed. + * decide to modify its own .data section. + * + * This code is included if a symbol "file:/proc/self/exe" is defined + * (see libc/calls/metalfile.internal.h & libc/calls/metalfile_init.S). + * The zipos code will automatically arrange to do this. Alternatively, + * user code can STATIC_YOINK this symbol. */ size_t size = ROUNDUP(_tdata_end - _base, 4096); void *copied_base;