On 8/7/21 11:42 AM, Warner Losh wrote:
@@ -332,86 +329,25 @@ static abi_ulong load_elf_interp(struct elfhdr 
*interp_elf_ex,
           */
          error = target_mmap(0, INTERP_MAP_SIZE, PROT_NONE,
                  MAP_PRIVATE | MAP_ANON, -1, 0);
-        if (error == -1) {
+        if (rbase == -1) {
              perror("mmap");
              exit(-1);
          }

Replacement not greedy enough -- rbase is always 0.

+/* Check the elf header and see if this a target elf binary. */
+int is_target_elf_binary(int fd)

This doesn't appear to be used at all.
Which is good, because it's buggy.

Otherwise,
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~

Reply via email to