From ccb2f8b695f424e3d2231290c141853e96e76e2e Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Sun, 15 Dec 2019 15:51:13 +0900 Subject: [PATCH] linker: close main object after loading --- linker/linker.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linker/linker.c b/linker/linker.c index 78e5bea3..edea9be6 100644 --- a/linker/linker.c +++ b/linker/linker.c @@ -777,6 +777,7 @@ nope: /* Relocate the main object */ TRACE_LD("Relocating main object"); object_relocate(main_obj); + fclose(main_obj->file); TRACE_LD("Placing heap at end"); while (end_addr & 0xFFF) { end_addr++;