raingloom schreef op vr 29-04-2022 om 00:52 [+0200]:
> It should be pretty easy to detect a wrapped binary without moving it.
> We could just include a magic string in it and scan for that, the exact
> same way we scan for store references. If it contains the "wrapped"
> magic UUID, it's wrapped.

This is already the case, at least for 'wrap-program':

(define (wrapped-program? prog)
  "Return #t if PROG is a program that was moved and wrapped by 'wrap-
program'."
  [...])

[...]
  (when (wrapped-program? prog)
    (error (string-append prog " is a wrapper. Refusing to wrap.")))


  (if already-wrapped?

      ;; PROG is already a wrapper: add the new "export VAR=VALUE"
lines just
      ;; before the last line.
      [...])
[...]

Greetings,
Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to