[U-Boot] [PATCH 2/2] [NEXT] arm926ejs: reduce code size with -msingle-pic-base

Ben Gardiner bengardiner at nanometrics.ca
Thu Sep 23 16:44:37 CEST 2010


On Wed, Sep 22, 2010 at 5:36 PM, Albert ARIBAUD <albert.aribaud at free.fr> wrote:
> Can you check the build logs to see which options were applied to
> lib/arm/board.c?

make[1]: Entering directory `[...]/arch/arm/lib'
arm-none-linux-gnueabi-gcc  -g  -Os   -fPIE -fno-common -ffixed-r8
-msoft-float -msingle-pic-base  -fno-common -ffixed-r8 -msoft-float
-D__KERNEL__ -DTEXT_BASE=0xC1080000 -I[...]/include -fno-builtin
-ffreestanding -nostdinc -isystem
/opt/codesourcery-arm-none-eabi-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include
-pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux
-mno-thumb-interwork -march=armv5te -march=armv5te -Wall
-Wstrict-prototypes -fno-stack-protector   \
                -o board.o board.c -c

On Wed, Sep 22, 2010 at 6:07 PM, Albert ARIBAUD <albert.aribaud at free.fr> wrote:
> I've just recompiled with the CodeSourcery toolchain and I can see the
> board_init_f prolog going thus:
>
> c1080688:       e59fa118        ldr     sl, [pc, #280]  ; c10807a8
> <board_init_f+0x120>
>
> c108068c:       e59f8118        ldr     r8, [pc, #280]  ; c10807ac
> <board_init_f+0x124>
>
> c1080690:       e08fa00a        add     sl, pc, sl
>
> It is scattered, but it is there.

Yes, I see them now that you point it out; but they are not
pc-relative for here;
c10806a4:       e514a004        ldr     sl, [r4, #-4]
c10806a8:       e35a0000        cmp     sl, #0  ; 0x0
...

What version of that compiler did you try? I tried both the 2009q1 and
2009q3 compilers.

> Also, I see board_init_f starting at c108064c. Ben, that's a different
> address from what you see in your map file, but maybe we're not using the
> same exact source tree? I tested with the current 'next' branch plus my two
> patches.

I had applied your patches to d70d8ccc200db8c16a6654cb726c3d74b6640b32.

I rebased your patches onto e69e520f9d235bb7d96296081fdfc09b9fee8c46
this morning and I now have "c108064c <board_init_f>:" same as you.
But I still do not get a boot prompt.

I am downloading the arm-2008-11-24.iso for ELDK-4.2 to try to
reproduce your results.

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca


More information about the U-Boot mailing list