All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] [NEXT] arm926ejs: reduce code size with -msingle-pic-base
Date: Thu, 23 Sep 2010 12:08:43 +0200	[thread overview]
Message-ID: <4C9B272B.6020803@denx.de> (raw)
In-Reply-To: <4C9B0A2E.6030603@free.fr>

Hello Albert,

Albert ARIBAUD wrote:
> Hello Heiko,
> 
> Thanks for the in-depth analysis.
> 
> IIUC:
> 
> Le 23/09/2010 09:12, Heiko Schocher a ?crit :
> 
>> /home/hs/celf/u-boot/arch/arm/cpu/arm926ejs/start.S:212: Error: internal_relocation (type: OFFSET_IMM) not fixed up
>> /home/hs/celf/u-boot/arch/arm/cpu/arm926ejs/start.S:308: Error: internal_relocation (type: OFFSET_IMM) not fixed up
> 
> This is due to the fact you're using a specific .lds, and your fix below 
> corrects this for your .lds indeed. However, there might be other boards 

Yep.

> in the arm926 subtree which have their own .lds and would need the same 
> fix, so I'll find them all and extend your fix to others.

Hmm.. I don;t know the other boards ... so, I decided for
the relocation patches not to fix all arm boards, instead
inroduce the CONFIG_SYS_ARM_WITHOUT_RELOC, and board
maintainers (or others who have time for it) can adapt
the boards to this new code. So we always have a chance
to keep track which boards are converted *and* working
and which boards are not working ... so, I could not say,
if it is a good idea to fix other boards, you could not
test (I know, usually we do this fixes, but the relocation
code is such a deep change, I prefer to add only real
tested patches ...)

>> I had to define _got_base and _relocate_got_base_r also for
>> the NAND_SPL case, and don;t need to fix up the "pic base
>> register", if we are at the right position.
> 
> Thanks for spotting and fixing these. :)
> 
>> I think we(you ;-) should add my below fix to your
>>
>> [U-Boot] [PATCH 2/2] [NEXT] arm926ejs: reduce code size with	-msingle-pic-base
>>
>> and send a second version of it, so we are bisect compatible.
>>
>> you can add my
>>
>> Signed-off-by: Heiko Schocher<hs@denx.de>
>>
>> to it.
> 
> I will -- thanks!
> 
>> Can you test this also on your board? Thanks!
> 
> I will too. :)

Thanks!

> Just one thing: are these TEXT_BASE / CONFIG_SYS_NAND_U_BOOT_DST 
> modifications in your patch really needed for the board to run, or are 
> they a manual layout optimization decided based on the code size reduction?

Yes.
I decided for this board to set TEXT_BASE = CONFIG_SYS_NAND_U_BOOT_DST =
relocation address, so I can prevent one copying of u-boot code.
(The u-boot-nand code copy u-boot to CONFIG_SYS_NAND_U_BOOT_DST, which
 is on the later calculated relocation address -> no need to copy it
 again ... if there is more RAM on this board, u-boot of course copy
 itself to the higher address)

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2010-09-23 10:08 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-22 13:57 [U-Boot] [PATCH 1/2] [NEXT] arm: change relocation flag from -fPIC to -fPIE Albert Aribaud
2010-09-22 13:57 ` [U-Boot] [PATCH 2/2] [NEXT] arm926ejs: reduce code size with -msingle-pic-base Albert Aribaud
2010-09-22 18:05   ` Ben Gardiner
2010-09-22 19:07     ` Albert ARIBAUD
2010-09-22 20:51       ` Ben Gardiner
2010-09-22 21:36         ` Albert ARIBAUD
2010-09-22 22:07           ` Albert ARIBAUD
2010-09-23 14:44           ` Ben Gardiner
2010-09-23 15:13             ` Albert ARIBAUD
2010-09-23 15:35               ` Ben Gardiner
2010-09-23 16:53             ` Ben Gardiner
2010-09-23 16:37       ` Ben Gardiner
2010-09-23 17:04         ` Albert ARIBAUD
2010-09-23 21:13           ` Ben Gardiner
2010-09-23 21:30             ` Albert ARIBAUD
2010-09-24 13:38               ` Ben Gardiner
2010-09-24 16:08                 ` Albert ARIBAUD
2010-09-22 20:30     ` Wolfgang Denk
2010-09-22 20:55       ` Ben Gardiner
2010-09-22 21:11         ` Wolfgang Denk
2010-09-22 21:33           ` Ben Gardiner
2010-09-23  7:12   ` Heiko Schocher
2010-09-23  8:05     ` Albert ARIBAUD
2010-09-23 10:08       ` Heiko Schocher [this message]
2010-09-23 12:45         ` Albert ARIBAUD
2010-09-24  5:11           ` Heiko Schocher
2010-09-24  5:47             ` Albert ARIBAUD
2010-09-24 16:45               ` Rogan Dawes
2010-09-24 16:58                 ` Rogan Dawes
2010-09-24 17:13                   ` Albert ARIBAUD
2010-09-22 18:05 ` [U-Boot] [PATCH 1/2] [NEXT] arm: change relocation flag from -fPIC to -fPIE Ben Gardiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C9B272B.6020803@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.