From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 25 Mar 2011 19:35:36 +0100 Subject: [U-Boot] [RFC PATCH] arm: provide a CONFIG flag for disabling relocation In-Reply-To: <4D8CBF09.8020409@ti.com> References: <1301058732-30898-1-git-send-email-aneesh@ti.com> <20110325141231.C3684151F80@gemini.denx.de> <4D8CBF09.8020409@ti.com> Message-ID: <4D8CE078.5050603@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 25/03/2011 17:12, Aneesh V a ?crit : > Another problem I have with relocation is that it makes debugging with > JTAG debugers more difficult. The addresses of symbols in the ELF > target are no longer valid. Of course, you can load the symbols at an > offset from the original location. But one has to first enable debug > prints, find the relocation offset, use it while loading the symbols > before you can do source level debugging. Actually you don't need recompiling: simply set a breakpoint at the entry of relocate_code and once you hit the bp, look up r2: it contains the destination. If you want the offset rather than the absolute address, set the breakpoint right after the 'sub r9, r6, r0' round line 222: r9 will then give you the offset. Unload the current symbols, reload the symbols with the relevant offset, and there you go. Amicalement, -- Albert.