Re: [U-Boot] armv8 relocation questions

2014-05-26 Thread Wolfgang Denk
Dear David, In message you wrote: > > I am will glad to share my understanding. Thanks. > > I wonder how "adrp" would work in any code that is supposed to be > > position-independent? > In my understanding, with adrp the program is still relocatable except that > the text base should be 4

Re: [U-Boot] armv8 relocation questions

2014-05-26 Thread feng...@phytium.com.cn
hi Wolfgang, I am will glad to share my understanding. > Dear David, > > In message <0579e649-f359-415b-a8ed-e1d4267f8...@phytium.com.cn> you wrote: >> >>> And if any text base alignment is less than the image's maximum >>> alignment requirement, the load will fail, and then we likely scra

Re: [U-Boot] armv8 relocation questions

2014-05-22 Thread Wolfgang Denk
Dear David, In message <0579e649-f359-415b-a8ed-e1d4267f8...@phytium.com.cn> you wrote: > > > And if any text base alignment is less than the image's maximum > > alignment requirement, the load will fail, and then we likely scratch > > our heads and set the CONFIG_SYS_TEXT_BASE alignment higher u

Re: [U-Boot] armv8 relocation questions

2014-05-22 Thread feng...@phytium.com.cn
> On 14-05-16 06:47 AM, feng...@phytium.com.cn wrote: >> >> hi Darwin, >>It's a little late. >>> I'm hoping someone can help answer these questions about armv8 relocation. >>> >>> The CONFIG_SYS_TEXT_BASE seems to be be usually setup to a decent amount of >>> alignment. For the purposes

Re: [U-Boot] armv8 relocation questions

2014-05-20 Thread Jeroen Hofstee
Hello Wolfgang, On ma, 2014-05-19 at 23:05 +0200, Wolfgang Denk wrote: > Dear Jeroen, > > In message <1400532143.1985.57.camel@yellow> you wrote: > > > > > I have no idea how the tool chain was configured here, and what the > > > linker script might look like. > > > > for what it is worth: > >

Re: [U-Boot] armv8 relocation questions

2014-05-19 Thread Wolfgang Denk
Dear Jeroen, In message <1400532143.1985.57.camel@yellow> you wrote: > > > I have no idea how the tool chain was configured here, and what the > > linker script might look like. > > for what it is worth: > aarch64-linux-gnu-gcc (Ubuntu/Linaro 4.8.1-10ubuntu7) 4.8.1 > with its default linker scri

Re: [U-Boot] armv8 relocation questions

2014-05-19 Thread Jeroen Hofstee
Hello Wolfgang, On ma, 2014-05-19 at 20:30 +0200, Wolfgang Denk wrote: > Dear Jeroen Hofstee, > > In message <1400523005.1985.33.camel@yellow> you wrote: > > > > mm, forget about U-Boot for a second and please consider the following, > > complicated, program: > > I think we should NOT forget U-

Re: [U-Boot] armv8 relocation questions

2014-05-19 Thread Wolfgang Denk
Dear Jeroen Hofstee, In message <1400523005.1985.33.camel@yellow> you wrote: > > mm, forget about U-Boot for a second and please consider the following, > complicated, program: I think we should NOT forget U-Boot, which comes with it's own, specifically tuned set of compiler options and linker s

Re: [U-Boot] armv8 relocation questions

2014-05-19 Thread Jeroen Hofstee
Hello Wolfgang, On ma, 2014-05-19 at 14:33 +0200, Wolfgang Denk wrote: > Dear Jeroen, > > In message <1400485047.1998.17.camel@yellow> you wrote: > > > > > > "ADRP Xd, label > > > ... > > > > And apparently gcc choose to use it as such. Since the instructions in > > > > > > Where exactly does i

Re: [U-Boot] armv8 relocation questions

2014-05-19 Thread Wolfgang Denk
Dear Jeroen, In message <1400485047.1998.17.camel@yellow> you wrote: > > > > "ADRP Xd, label > > ... > > > And apparently gcc choose to use it as such. Since the instructions in > > > > Where exactly does it chose to do so? > > In the code emitter which decide to use the following instructions

Re: [U-Boot] armv8 relocation questions

2014-05-19 Thread Jeroen Hofstee
Hello Wolfgang. On zo, 2014-05-18 at 21:51 +0200, Wolfgang Denk wrote: > In message <1400416665.2394.20.camel@yellow> you wrote: > > > > > > So, I think the 4kb alignment would be a requirement or restriction. > > > > Gcc did not declare it explicitly > > > > due to in normal world memory are al

Re: [U-Boot] armv8 relocation questions

2014-05-18 Thread Wolfgang Denk
Dear Jeroen, In message <1400416665.2394.20.camel@yellow> you wrote: > > > > So, I think the 4kb alignment would be a requirement or restriction. > > > Gcc did not declare it explicitly > > > due to in normal world memory are allocated with page aligned. > > > If u-boot for aarch64 want to be com

Re: [U-Boot] armv8 relocation questions

2014-05-18 Thread Jeroen Hofstee
Hello Wolfgang, On za, 2014-05-17 at 18:53 +0200, Wolfgang Denk wrote: > Dear fenghua, > > In message you wrote: > > > > > > We can not make gcc-aarch64 do not use adrp instruction when > > constructing address of label. > > > > So, I think the 4kb alignment would be a requirement or restrict

Re: [U-Boot] armv8 relocation questions

2014-05-17 Thread Wolfgang Denk
Dear fenghua, In message you wrote: > > > We can not make gcc-aarch64 do not use adrp instruction when > constructing address of label. > > So, I think the 4kb alignment would be a requirement or restriction. > Gcc did not declare it explicitly > due to in normal world memory are allocated wit

Re: [U-Boot] armv8 relocation questions

2014-05-16 Thread feng...@phytium.com.cn
> > hi Darwin, > It's a little late. >> I'm hoping someone can help answer these questions about armv8 relocation. >> >> The CONFIG_SYS_TEXT_BASE seems to be be usually setup to a decent amount of >> alignment. For the purposes of this discussion, let's say it would normally >> be 0x8800

Re: [U-Boot] armv8 relocation questions

2014-05-16 Thread feng...@phytium.com.cn
Hi Jeroen, > Hello Tom, > > On vr, 2014-05-16 at 17:15 -0400, Tom Rini wrote: >> On Fri, May 16, 2014 at 10:28:25PM +0200, Wolfgang Denk wrote: >>> Dear Darwin, >>> >>> In message <53763b78.6030...@broadcom.com> you wrote: 3. Fixed offset case: CONFIG_SYS_TEXT_BASE = 0x8820

Re: [U-Boot] armv8 relocation questions

2014-05-16 Thread Jeroen Hofstee
Hello Tom, On vr, 2014-05-16 at 17:15 -0400, Tom Rini wrote: > On Fri, May 16, 2014 at 10:28:25PM +0200, Wolfgang Denk wrote: > > Dear Darwin, > > > > In message <53763b78.6030...@broadcom.com> you wrote: > > > > > > 3. Fixed offset case: > > > CONFIG_SYS_TEXT_BASE = 0x8820 > > > > You compl

Re: [U-Boot] armv8 relocation questions

2014-05-16 Thread Tom Rini
On Fri, May 16, 2014 at 02:24:47PM -0700, Darwin Rambo wrote: > > > On 14-05-16 01:28 PM, Wolfgang Denk wrote: > >Dear Darwin, > > > >In message <53763b78.6030...@broadcom.com> you wrote: > >> > >>3. Fixed offset case: > >>CONFIG_SYS_TEXT_BASE = 0x8820 > > > >You completely fail to respond to

Re: [U-Boot] armv8 relocation questions

2014-05-16 Thread Darwin Rambo
On 14-05-16 01:28 PM, Wolfgang Denk wrote: Dear Darwin, In message <53763b78.6030...@broadcom.com> you wrote: 3. Fixed offset case: CONFIG_SYS_TEXT_BASE = 0x8820 You completely fail to respond to my repeated statement that a CONFIG_SYS_TEXT_BASE like this is bogus. I want to set it thi

Re: [U-Boot] armv8 relocation questions

2014-05-16 Thread Tom Rini
On Fri, May 16, 2014 at 10:28:25PM +0200, Wolfgang Denk wrote: > Dear Darwin, > > In message <53763b78.6030...@broadcom.com> you wrote: > > > > 3. Fixed offset case: > > CONFIG_SYS_TEXT_BASE = 0x8820 > > You completely fail to respond to my repeated statement that a > CONFIG_SYS_TEXT_BASE lik

Re: [U-Boot] armv8 relocation questions

2014-05-16 Thread Wolfgang Denk
Dear Darwin, In message <53763b78.6030...@broadcom.com> you wrote: > > 3. Fixed offset case: > CONFIG_SYS_TEXT_BASE = 0x8820 You completely fail to respond to my repeated statement that a CONFIG_SYS_TEXT_BASE like this is bogus. I guess i give up on this. > Any section in the image that req

Re: [U-Boot] armv8 relocation questions

2014-05-16 Thread Darwin Rambo
On 14-05-16 06:47 AM, feng...@phytium.com.cn wrote: hi Darwin, It's a little late. I'm hoping someone can help answer these questions about armv8 relocation. The CONFIG_SYS_TEXT_BASE seems to be be usually setup to a decent amount of alignment. For the purposes of this discussion, l

Re: [U-Boot] armv8 relocation questions

2014-05-16 Thread feng...@phytium.com.cn
hi Darwin, It's a little late. > I'm hoping someone can help answer these questions about armv8 relocation. > > The CONFIG_SYS_TEXT_BASE seems to be be usually setup to a decent amount of > alignment. For the purposes of this discussion, let's say it would normally > be 0x8800 and al

[U-Boot] armv8 relocation questions

2014-05-13 Thread Darwin Rambo
I'm hoping someone can help answer these questions about armv8 relocation. The CONFIG_SYS_TEXT_BASE seems to be be usually setup to a decent amount of alignment. For the purposes of this discussion, let's say it would normally be 0x8800 and all is well. The relocation address moves to near