public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH RFC] armv7: fixloop: don't fixup if location is NULL
Date: Sat, 08 Jan 2011 11:49:58 +0100	[thread overview]
Message-ID: <4D284156.90305@free.fr> (raw)
In-Reply-To: <24AA7201-FEC9-4485-837F-52CF0CBD06C4@googlemail.com>

Le 08/01/2011 11:32, Andreas Bie?mann a ?crit :
> Dear Minkyu Kang,
>
> Am 27.12.2010 um 11:27 schrieb Minkyu Kang:
>
>> There is possibility that pointers set to NULL before relocation.
>> In this case, system is hang, because of r0 is invalid location in RAM.
>>
>> Signed-off-by: Minkyu Kang<mk7.kang@samsung.com>
>> ---
>> arch/arm/cpu/armv7/start.S |    3 +++
>> 1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
>> index 684f2d2..4eeb12a 100644
>> --- a/arch/arm/cpu/armv7/start.S
>> +++ b/arch/arm/cpu/armv7/start.S
>> @@ -195,6 +195,8 @@ copy_loop:
>> 	add	r3, r3, r0		/* r3<- rel dyn end in FLASH */
>> fixloop:
>> 	ldr	r0, [r2]		/* r0<- location to fix up, IN FLASH! */
>> +	cmp	r0, #0
>> +	beq	fixskip
>
> I doubt this is correct. In my investigations for 'NULL fixup' (->  see http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/89864/focus=89906) pointed out that only symbols in 'absolute fixup' loop could be 'NULL' if there is a not aliased/empty weakly linked symbol. I did never see a 'NULL' symbol for 'relative fixup' loop!
>
> Therefore I doubt it is correct to check the location at this place. Can you please give an example?
>
> regards
>
> Andreas Bie?mann

Oops. Thanks Andreas for pointing this out. I second the question.

Amicalement,
-- 
Albert.

  reply	other threads:[~2011-01-08 10:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-27 10:27 [U-Boot] [PATCH RFC] armv7: fixloop: don't fixup if location is NULL Minkyu Kang
     [not found] ` <AANLkTikMdk3D99mEtpLP6ZDb+5WiorN3Qqm-84LkgN6p@mail.gmail.com>
2011-01-04  8:52   ` [U-Boot] [PATCH v2, RFC] armv7: fixloop: don't fixup if location is invalid on RAM Minkyu Kang
2011-01-04  9:49     ` Joakim Tjernlund
2011-01-04 10:04       ` Minkyu Kang
2011-01-04 10:31         ` Joakim Tjernlund
2011-01-04 11:02           ` Minkyu Kang
2011-01-04 16:23             ` Joakim Tjernlund
2011-01-04 17:02             ` Albert ARIBAUD
2011-01-05  5:27               ` Minkyu Kang
2011-01-08  7:43                 ` Albert ARIBAUD
2011-01-08 10:32 ` [U-Boot] [PATCH RFC] armv7: fixloop: don't fixup if location is NULL Andreas Bießmann
2011-01-08 10:49   ` Albert ARIBAUD [this message]
2011-01-08 12:18     ` Albert ARIBAUD
2011-01-08 16:44       ` Joakim Tjernlund
2011-01-08 16:51       ` Andreas Bießmann
2011-01-09  9:00         ` Albert ARIBAUD
2011-01-09 21:26           ` Andreas Bießmann
2011-01-10  7:31     ` Minkyu Kang
2011-01-10 10:20       ` Wolfgang Denk
2011-01-10 11:30         ` Minkyu Kang
2011-01-10 12:14           ` Wolfgang Denk
2011-01-10 14:04             ` Minkyu Kang
2011-01-10 17:21               ` Albert ARIBAUD
2011-01-11 10:57                 ` Minkyu Kang
2011-01-11 11:03                   ` Wolfgang Denk
2011-01-11 11:13                     ` Minkyu Kang
2011-01-11 11:23                       ` Wolfgang Denk
2011-01-11 13:00                   ` Andreas Bießmann
2011-01-11 13:07                     ` Andreas Bießmann

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=4D284156.90305@free.fr \
    --to=albert.aribaud@free.fr \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox