From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Sun, 03 Oct 2010 10:58:00 +0200 Subject: [U-Boot] ARM relocation, question to Heiko In-Reply-To: <4CA8426E.4060505@gmail.com> References: <4CA49746.2050301@emk-elektronik.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> <4CA6E517.9040701@fr <4CA6F687.1080600@denx.de> <4CA75BFB.5030208@comcast.net> <4CA79896.2010606@emk-elektronik.de> <4CA79F96.9060702@free.fr> <4CA7BB24.80201@gmail.com> <4CA82C51.7030300@free.fr> <4CA8426E.4060505@gmail.com> Message-ID: <4CA84598.9070204@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 03/10/2010 10:44, Graeme Russ a ?crit : >> Bill just said that -pic (or, for ARM, -fPIC or -fPIE) was unnecessary >> for relocation. You seem to imply it actually is... In my experience, >> -fPIC and-fPIE do increase code by adding GOT relocation to symbols that >> need fixing, so they would indeed be redundant to any other relocation >> mechanism -- I just did some test with basic code and this seems to >> confirm, no -fPIx is needed to get relocation the way you do on ARM. > > Just to clarify -fpic is a compiler option, -pic is a linker option. x86 > has no compile time relocation options (therefore no referencing .got etc). > Using the link time pic option produces the relocation data table > (.rel.dyn) which must be pre-processed before execution can begin at the > relocated address Thanks for clarifying, Graeme. This is consistent with the ARM compile-time options -fPIC/-fPIE vs link-time option -pie. So there may be at least an interest in investigating ELF-style relocation on ARM and comparing it to GOT-based relocation in terms of FLASH and RAM sizes and code speed. > Cheers, > > Graeme Amicalement, -- Albert.