From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Mon, 04 Oct 2010 07:52:16 +0200 Subject: [U-Boot] ARM relocation, question to Heiko In-Reply-To: <20101003182942.55A1E1539A0@gemini.denx.de> References: <4CA49746.2050301@emk-elektronik.de> <20100930174308.070ECD2B48C@gemini.denx.de> <4CA570D3.9040406@denx.de> <4CA57468.6090702@free.fr> <4CA57762.3000201@denx.de> <4CA5821E.3070108@emk-elektronik.de> <4CA5873B.6040907@free.fr> <4CA590E6.6070701@emk-elektronik.de> <4CA59B89.6090207@denx.de> <4CA5BB7A.8050304@emk-elektronik.de> <20101001105506.A64D41539A0@gemini.denx.de> <4CA5BFEF.3090208@emk-elektronik.de> <20101001112125.4076E153A7E@gemini.denx.de> <4CA5C7DE.6010300@emk-elektronik.de> <20101001115908.A34411539A0@gemini.denx.de> <4CA5D26D.2090505@emk-elektronik.de> <4CA5D857.5010009@emk-elektronik.de> <20101001125502.D0B4E1539A0@gemini.denx.de> <4CA6DC16.5040409@emk-elektronik.de> <4CA75BFB.5030208@comcast.net> <4CA79896.2010606@emk-elektronik.de> <20101003182942.55A1E1539A0@gemini.denx.de> Message-ID: <4CA96B90.7030908@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Wolfgang, Wolfgang Denk wrote: > Dear Reinhard Meyer, > > In message <4CA79896.2010606@emk-elektronik.de> you wrote: >> I agree here. _If_ relocation, it should work without hand-adding >> fixup stuff to all functions using initialized data with pointers. >> Even Wolfgang forgot to fixup his 2nd level command table in >> cmd_nvedit.c ;) > > I didn't forget it - at least not in the sensse that I think this is > something that needs to be done. > > This works fine on PPC with relocation, and we should make it work > the same on other arches. If we find a way for this on ARM, Ack! >> And, for space concerns in flash, relocation should always be an >> option on a board by board basis... > > NAK. > >> And as an idea, if position independent code is used, only pointers >> in initialized data need adjustment. Cannot the linker emit a table >> of addresses that need fixing? > > It does. That's the GOT. So I thought too, and I made a fixup in relocate_code() for the GOT entries. But this don;t work with for example the commandtables. bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany