From 136ed031d8c43ef05efe383b2bf362f6bd06831c Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Fri, 22 Apr 2011 11:52:59 +0430 Subject: [PATCH] use load address for entry point --- ld.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ld.c b/ld.c index 94cddb1..65d6286 100644 --- a/ld.c +++ b/ld.c @@ -360,7 +360,8 @@ static void build_symtab(struct outelf *oe) static void outelf_write(struct outelf *oe, int fd) { int i; - oe->ehdr.e_entry = outelf_addr(oe, "_start"); + oe->ehdr.e_entry = outelf_addr(oe, "_start") - + sec_vaddr[I_CS] + sec_laddr[I_CS]; if (!nosyms) build_symtab(oe); oe->ehdr.e_phnum = oe->nph; -- 2.11.4.GIT