From 611f95689e1012283bd11917003d3740d3ce532d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 23 Jan 2015 10:43:58 -0800 Subject: [PATCH] Add a log message to make the transition from linker to user code clear. Handy when looking at strace output for seeing "where does my code start?", though you'll need to set LD_DEBUG=1 (or greater) and constructors will already have run (but you can set LD_DEBUG to a higher value to track that). Change-Id: I82d53a7123b39febf5b2a956de83c8a30f229651 --- linker/linker.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linker/linker.cpp b/linker/linker.cpp index df6a4e2e1..df8e52e7d 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -2675,6 +2675,8 @@ extern "C" ElfW(Addr) __linker_init(void* raw_args) { protect_data(PROT_READ); + INFO("[ jumping to _start ]"); + // Return the address that the calling assembly stub should jump to. return start_address; }