From acb411e6c67e2af948bb7185ef6f140a7550d826 Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Wed, 10 Jan 2018 18:37:10 +0900 Subject: [PATCH] avoid missing libc_start_main relocation issue https://groups.google.com/forum/#!msg/ns-3-users/JIirultln1o/-2C4oTVhAAAJ Signed-off-by: Hajime Tazaki --- model/libc-dce.cc | 2 ++ model/libc-ns3.h | 1 + 2 files changed, 3 insertions(+) diff --git a/model/libc-dce.cc b/model/libc-dce.cc index b2c19ead..796a4eaf 100644 --- a/model/libc-dce.cc +++ b/model/libc-dce.cc @@ -146,6 +146,8 @@ typedef void (*func_t)(...); extern "C" { + extern int __libc_start_main(int *(main) (int, char * *, char * *), int argc, char * * ubp_av, void (*init) (void), void (*fini) (void), void (*rtld_fini) (void), void (* stack_end)); + void libc_dce (struct Libc **libc) { *libc = new Libc; diff --git a/model/libc-ns3.h b/model/libc-ns3.h index 3de70c7b..3be20e4c 100644 --- a/model/libc-ns3.h +++ b/model/libc-ns3.h @@ -619,6 +619,7 @@ DCE_WITH_ALIAS2 (dlopen, __dlopen) DCE (dlsym) NATIVE (dl_iterate_phdr) +NATIVE (__libc_start_main) #undef DCE #undef DCET