public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V3 1/2] [NEXT] arm: change relocation flag from -fPIC to -fPIE
@ 2010-09-28 13:14 Albert Aribaud
  2010-09-28 13:14 ` [U-Boot] [PATCH V3 2/2] [NEXT] arm926ejs: reduce code size with -msingle-pic-base Albert Aribaud
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Albert Aribaud @ 2010-09-28 13:14 UTC (permalink / raw)
  To: u-boot

Replace GOT indirect addressing with more efficient pic-base
relative addressing for initialized data (uninitialized data
still use GOTi indirect addressing).  This also reduces code
size by 0.4% compared to -fPIC.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
---
SUMMARY

This patch aims at optimizing relocatable code both in size and
speed. The first patch switches from '-fPIC' to '-fPIE', which makes
initialized data accesses pc-relative rather than GOT-indirect, and
the second adds '-msingle-pic-base' which factors out GOT addressing
by computing it once and for all.

PATCHSET HISTORY

V1	Initial submission
V2	Compute RAM pic base only if actually relocating
	Fixed RAM pic base computation and copy loop
V3	Added fix for tx25

 arch/arm/config.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 6923f6d..138c43a 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -35,7 +35,7 @@ endif
 
 ifndef CONFIG_SYS_ARM_WITHOUT_RELOC
 # needed for relocation
-PLATFORM_RELFLAGS += -fPIC
+PLATFORM_RELFLAGS += -fPIE
 endif
 
 ifdef CONFIG_SYS_ARM_WITHOUT_RELOC
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-10-01  7:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 13:14 [U-Boot] [PATCH V3 1/2] [NEXT] arm: change relocation flag from -fPIC to -fPIE Albert Aribaud
2010-09-28 13:14 ` [U-Boot] [PATCH V3 2/2] [NEXT] arm926ejs: reduce code size with -msingle-pic-base Albert Aribaud
2010-09-28 13:39   ` Ben Gardiner
2010-09-29  6:01     ` Albert ARIBAUD
2010-09-28 13:57   ` Heiko Schocher
2010-09-29  6:04     ` Albert ARIBAUD
2010-09-29  6:50       ` Wolfgang Denk
2010-09-29  7:38         ` Albert ARIBAUD
2010-09-29  8:55           ` Wolfgang Denk
2010-10-01  4:52             ` Albert ARIBAUD
2010-10-01  7:07               ` Prafulla Wadaskar
2010-09-28 13:38 ` [U-Boot] [PATCH V3 1/2] [NEXT] arm: change relocation flag from -fPIC to -fPIE Ben Gardiner
2010-09-28 13:57 ` Heiko Schocher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox