All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <xili_gchen_5257@hotmail.com>
To: Steven Miao <realmz6@gmail.com>
Cc: Richard Weinberger <richard.weinberger@gmail.com>,
	bfin <adi-buildroot-devel@lists.sourceforge.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] blackfin: Makefile: Skip reloc overflow issue when COMPILE_TEST enabled
Date: Thu, 23 Apr 2015 22:30:13 +0800	[thread overview]
Message-ID: <BLU436-SMTP201CF3C43A56C7A7F4960D1B9ED0@phx.gbl> (raw)
In-Reply-To: <CAMk6uB==TbrmY4j5SC8_nLR+ea0xAyGz5erqsvLJa=jF2MbpvA@mail.gmail.com>

On 4/23/15 10:51, Steven Miao wrote:
> On Wed, Apr 22, 2015 at 10:32 PM, Chen Gang <xili_gchen_5257@hotmail.com> wrote:
>> On 4/22/15 17:00, Steven Miao wrote:
>>> Hi,
>>>
>>> On Thu, Apr 9, 2015 at 5:03 AM, Chen Gang <xili_gchen_5257@hotmail.com> wrote:
>>>> l1_text is at L1_CODE_START (e.g. for bf533, 0xff800000). If the kernel
>>>> is too big, it may be overwritten, the related issue:
>>>>
>>>>     LD      init/built-in.o
>>>>   init/built-in.o: In function `do_early_param':
>>>>   init/main.c:(.init.text+0xe0): relocation truncated to fit: R_BFIN_PCREL24 against symbol `strcmp' defined in .l1.text section in arch/blackfin/lib/lib.a(strcmp.o)
>>>>   init/main.c:(.init.text+0x10e): relocation truncated to fit: R_BFIN_PCREL24 against symbol `strcmp' defined in .l1.text section in arch/blackfin/lib/lib.a(strcmp.o)
>>> blackfin toolchain generate 24 bit pc-relative calls by default, with
>>> a range of –16,777,216 through 16,777,214 (0xFF00 0000 to 0x00FF FFFE)
>>> is available.
>>> So call to l1_text should be ok. What do you mean the kernel is too big?
>>> http://docs.blackfin.uclinux.org/doku.php?id=ism:call
>>>
>>>
>>
>> Excuse me, I am not quite familiar with what you said above, can we
>> also treat 24-bit as 16MB size limitation for kernel size? I am not
>> quite sure, could you provide more information about it?.
>>
>> And I checked "arch/blackfin/kernel/vmlinux.lds.S", for me, in current
>> case:
> The memory address on blackfin usually starts from 0, if pc = 0, the
> pc relative call range is [0xFF00 0000 - 0xFFFFFFFF, 0 -  0x00FF
> FFFE], it covers L1 space.
> If the kernel is big than 16M, eg. pc = 0x100 0000, the pc relative
> call range accordingly is [0x1 - 0x100 0000, 0x100 0000 - 0x 1FF FFFE
> ], it cann't call to L1 space.

OK, thanks. I guess your meaning is:

 - If the kernel is too big, it may let the pc which wants to call L1
   space fail.

 - So the kernel is too big to cause this issue, but it is nothing with
   'overwritten' in my original patch comments.

 - We can treat it as environments limitation, then can use COMPILE_TEST
   for it. So this patch is still OK, except the related comments need
   be improved (at least need to remove 'overwritten').

>>
>>  - init section is the last section of kernel, l1.text is within init
>>    section, and it is in the fixed address. The other contents before
>>    l1.text are dynamic (depend on kernel size).
>>

I guess, what I said above is meaningless (although it is correct).

>>  - if kernel is too big, the contents before l1.text (the other contents
>>    in .init.text) will override it, so ld reports issues.

I guess, what I said above is incorrect.


Are all of I guesses correct?


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

  reply	other threads:[~2015-04-23 14:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 21:03 [PATCH] blackfin: Makefile: Skip reloc overflow issue when COMPILE_TEST enabled Chen Gang
2015-04-08 21:10 ` Chen Gang
2015-04-08 21:12   ` Richard Weinberger
2015-04-09 13:28     ` Chen Gang
2015-04-09 13:38       ` Richard Weinberger
2015-04-09 23:14         ` Chen Gang
2015-04-22  9:00 ` Steven Miao
2015-04-22 14:32   ` Chen Gang
2015-04-23  2:51     ` Steven Miao
2015-04-23 14:30       ` Chen Gang [this message]
2015-04-24  8:20         ` Steven Miao
2015-04-24 14:28           ` Chen Gang
     [not found] ` <5525994D.6090901@hotmail.com>
2015-07-01 15:31   ` Chen Gang
2015-07-01 15:36   ` Chen Gang
2015-04-08 21:05 Chen Gang
2015-04-08 21:10 ` Richard Weinberger
2015-04-08 21:16   ` Chen Gang
2015-04-08 21:19     ` Richard Weinberger
2015-04-09 13:15       ` Chen Gang
2015-04-08 21:05 Chen Gang
2015-04-08 21:07 Chen Gang

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=BLU436-SMTP201CF3C43A56C7A7F4960D1B9ED0@phx.gbl \
    --to=xili_gchen_5257@hotmail.com \
    --cc=adi-buildroot-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=realmz6@gmail.com \
    --cc=richard.weinberger@gmail.com \
    /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.