* [U-Boot] [PATCH] ARM: fix broken build of ARM
@ 2011-01-27 16:03 Stefano Babic
2011-01-27 19:42 ` Alexander Holler
2011-01-27 22:44 ` Alexander Holler
0 siblings, 2 replies; 14+ messages in thread
From: Stefano Babic @ 2011-01-27 16:03 UTC (permalink / raw)
To: u-boot
Commit 8aba9dceebb14144e07d19593111ee3a999c37fc breaks
ARM boards because for ARM the -pie option is used
for partial linking together with -r option.
The patch adds the -pie option to link u-boot.bin only.
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Jason Liu <liu.h.jason@gmail.com>
CC: lool at dooz.org
CC: Wolfgang Denk <wd@denx.de>
CC: Albert Aribaud <albert.aribaud@free.fr>
---
arch/arm/config.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 4e165bf..a6a4742 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -67,5 +67,5 @@ LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
# needed for relocation
ifndef CONFIG_NAND_SPL
-PLATFORM_LDFLAGS += -pie
+LDFLAGS_u-boot += -pie
endif
--
1.7.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 16:03 [U-Boot] [PATCH] ARM: fix broken build of ARM Stefano Babic
@ 2011-01-27 19:42 ` Alexander Holler
2011-01-27 20:20 ` Albert ARIBAUD
2011-01-27 22:44 ` Alexander Holler
1 sibling, 1 reply; 14+ messages in thread
From: Alexander Holler @ 2011-01-27 19:42 UTC (permalink / raw)
To: u-boot
Hello,
Am 27.01.2011 17:03, schrieb Stefano Babic:
> Commit 8aba9dceebb14144e07d19593111ee3a999c37fc breaks
> ARM boards because for ARM the -pie option is used
> for partial linking together with -r option.
>
> The patch adds the -pie option to link u-boot.bin only.
Using native compilation with gcc 4.5.2 and binutils 2.21 this patch
will result in an unusable u-boot. It halts here after DRAM: ... just
like it was before some relocation fixes (regarding binutils).
Regards,
Alexander
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 19:42 ` Alexander Holler
@ 2011-01-27 20:20 ` Albert ARIBAUD
2011-01-27 20:55 ` Alexander Holler
0 siblings, 1 reply; 14+ messages in thread
From: Albert ARIBAUD @ 2011-01-27 20:20 UTC (permalink / raw)
To: u-boot
Hi Alexander,
Le 27/01/2011 20:42, Alexander Holler a ?crit :
> Hello,
>
> Am 27.01.2011 17:03, schrieb Stefano Babic:
>> Commit 8aba9dceebb14144e07d19593111ee3a999c37fc breaks
>> ARM boards because for ARM the -pie option is used
>> for partial linking together with -r option.
>>
>> The patch adds the -pie option to link u-boot.bin only.
>
> Using native compilation with gcc 4.5.2 and binutils 2.21 this patch
> will result in an unusable u-boot. It halts here after DRAM: ... just
> like it was before some relocation fixes (regarding binutils).
Which board do you compile?
> Regards,
>
> Alexander
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 20:20 ` Albert ARIBAUD
@ 2011-01-27 20:55 ` Alexander Holler
2011-01-27 21:10 ` Albert ARIBAUD
0 siblings, 1 reply; 14+ messages in thread
From: Alexander Holler @ 2011-01-27 20:55 UTC (permalink / raw)
To: u-boot
Am 27.01.2011 21:20, schrieb Albert ARIBAUD:
> Hi Alexander,
>
> Le 27/01/2011 20:42, Alexander Holler a ?crit :
>> Hello,
>>
>> Am 27.01.2011 17:03, schrieb Stefano Babic:
>>> Commit 8aba9dceebb14144e07d19593111ee3a999c37fc breaks
>>> ARM boards because for ARM the -pie option is used
>>> for partial linking together with -r option.
>>>
>>> The patch adds the -pie option to link u-boot.bin only.
>>
>> Using native compilation with gcc 4.5.2 and binutils 2.21 this patch
>> will result in an unusable u-boot. It halts here after DRAM: ... just
>> like it was before some relocation fixes (regarding binutils).
>
> Which board do you compile?
Upps, sorry, that one was on a BeagleBoard (armv7, omap3).
Regards,
Alexander
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 20:55 ` Alexander Holler
@ 2011-01-27 21:10 ` Albert ARIBAUD
2011-01-27 21:14 ` Wolfgang Denk
2011-01-27 21:32 ` Alexander Holler
0 siblings, 2 replies; 14+ messages in thread
From: Albert ARIBAUD @ 2011-01-27 21:10 UTC (permalink / raw)
To: u-boot
Le 27/01/2011 21:55, Alexander Holler a ?crit :
> Am 27.01.2011 21:20, schrieb Albert ARIBAUD:
>> Hi Alexander,
>>
>> Le 27/01/2011 20:42, Alexander Holler a ?crit :
>>> Hello,
>>>
>>> Am 27.01.2011 17:03, schrieb Stefano Babic:
>>>> Commit 8aba9dceebb14144e07d19593111ee3a999c37fc breaks
>>>> ARM boards because for ARM the -pie option is used
>>>> for partial linking together with -r option.
>>>>
>>>> The patch adds the -pie option to link u-boot.bin only.
>>>
>>> Using native compilation with gcc 4.5.2 and binutils 2.21 this patch
>>> will result in an unusable u-boot. It halts here after DRAM: ... just
>>> like it was before some relocation fixes (regarding binutils).
>>
>> Which board do you compile?
>
> Upps, sorry, that one was on a BeagleBoard (armv7, omap3).
I've just tried the following to compare make logs of before commit
8aba9dceebb14144e07d19593111ee3a999c37fc on the one hand and after this
commit and with the proposed fix on the other hand:
git checkout 8aba9dceebb14144e07d19593111ee3a999c37fc^
(that's the commit just before the one which split LD_FLAGS)
make distclean ; make edminiv2_config; make > ~/old.txt 2>&1
git checkout 8aba9dceebb14144e07d19593111ee3a999c37fc
(that's the commit which split LD_FLAGS)
(replace "PLATFORM_LDFLAGS += -pie" with "LDFLAGS_u-boot += -pie" in
arch/arm/config.mk)
make distclean ; make edminiv2_config; make > ~/new.txt 2>&1
(and finally)
kdiff3 ~/old.txt ~/new.txt
The only difference I see between the make logs is the relative location
of the -pie option in the final ld invocation: in the 'old' case options go
... -Bstatic -T u-boot.lds -pie -Ttext ...
whereas in the 'new' case, they go
... -pie -Bstatic -T u-boot.lds -Ttext ...
So I think the binary should be pretty much the same in the 'old' and
'new' cases, and that should be irrespective of the tool chain.
Alexander, can you run the same test with your BeagleBoard and let me
know of any differences?
> Regards,
>
> Alexander
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 21:10 ` Albert ARIBAUD
@ 2011-01-27 21:14 ` Wolfgang Denk
2011-01-27 21:32 ` Albert ARIBAUD
2011-01-27 21:32 ` Alexander Holler
1 sibling, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2011-01-27 21:14 UTC (permalink / raw)
To: u-boot
Dear Albert ARIBAUD,
In message <4D41DF41.4000708@free.fr> you wrote:
>
> So I think the binary should be pretty much the same in the 'old' and
> 'new' cases, and that should be irrespective of the tool chain.
>
> Alexander, can you run the same test with your BeagleBoard and let me
> know of any differences?
Also running a diff over the System.map and u-boot.map files is
usually a good and easy test that images are identical.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"More software projects have gone awry for lack of calendar time than
for all other causes combined."
- Fred Brooks, Jr., _The Mythical Man Month_
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 21:10 ` Albert ARIBAUD
2011-01-27 21:14 ` Wolfgang Denk
@ 2011-01-27 21:32 ` Alexander Holler
2011-01-27 21:40 ` Albert ARIBAUD
1 sibling, 1 reply; 14+ messages in thread
From: Alexander Holler @ 2011-01-27 21:32 UTC (permalink / raw)
To: u-boot
Am 27.01.2011 22:10, schrieb Albert ARIBAUD:
> Le 27/01/2011 21:55, Alexander Holler a ?crit :
>> Am 27.01.2011 21:20, schrieb Albert ARIBAUD:
>>> Hi Alexander,
>>>
>>> Le 27/01/2011 20:42, Alexander Holler a ?crit :
>>>> Hello,
>>>>
>>>> Am 27.01.2011 17:03, schrieb Stefano Babic:
>>>>> Commit 8aba9dceebb14144e07d19593111ee3a999c37fc breaks
>>>>> ARM boards because for ARM the -pie option is used
>>>>> for partial linking together with -r option.
>>>>>
>>>>> The patch adds the -pie option to link u-boot.bin only.
>>>>
>>>> Using native compilation with gcc 4.5.2 and binutils 2.21 this patch
>>>> will result in an unusable u-boot. It halts here after DRAM: ... just
>>>> like it was before some relocation fixes (regarding binutils).
>>>
>>> Which board do you compile?
>>
>> Upps, sorry, that one was on a BeagleBoard (armv7, omap3).
>
> I've just tried the following to compare make logs of before commit
> 8aba9dceebb14144e07d19593111ee3a999c37fc on the one hand and after this
> commit and with the proposed fix on the other hand:
Oh, it seems I've got misunderstood, the patch from Stefano Babic breaks
u-boot here and not the commit 8aba9dceebb14144e07d19593111ee3a999c37fc.
Regards,
Alexander
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 21:14 ` Wolfgang Denk
@ 2011-01-27 21:32 ` Albert ARIBAUD
0 siblings, 0 replies; 14+ messages in thread
From: Albert ARIBAUD @ 2011-01-27 21:32 UTC (permalink / raw)
To: u-boot
Le 27/01/2011 22:14, Wolfgang Denk a ?crit :
> Dear Albert ARIBAUD,
>
> In message<4D41DF41.4000708@free.fr> you wrote:
>>
>> So I think the binary should be pretty much the same in the 'old' and
>> 'new' cases, and that should be irrespective of the tool chain.
>>
>> Alexander, can you run the same test with your BeagleBoard and let me
>> know of any differences?
>
> Also running a diff over the System.map and u-boot.map files is
> usually a good and easy test that images are identical.
Indeed -- my goal was to compare the build processes more than their
products.
> Best regards,
>
> Wolfgang Denk
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 21:32 ` Alexander Holler
@ 2011-01-27 21:40 ` Albert ARIBAUD
2011-01-27 22:19 ` Alexander Holler
0 siblings, 1 reply; 14+ messages in thread
From: Albert ARIBAUD @ 2011-01-27 21:40 UTC (permalink / raw)
To: u-boot
Le 27/01/2011 22:32, Alexander Holler a ?crit :
> Am 27.01.2011 22:10, schrieb Albert ARIBAUD:
>> Le 27/01/2011 21:55, Alexander Holler a ?crit :
>>> Am 27.01.2011 21:20, schrieb Albert ARIBAUD:
>>>> Hi Alexander,
>>>>
>>>> Le 27/01/2011 20:42, Alexander Holler a ?crit :
>>>>> Hello,
>>>>>
>>>>> Am 27.01.2011 17:03, schrieb Stefano Babic:
>>>>>> Commit 8aba9dceebb14144e07d19593111ee3a999c37fc breaks
>>>>>> ARM boards because for ARM the -pie option is used
>>>>>> for partial linking together with -r option.
>>>>>>
>>>>>> The patch adds the -pie option to link u-boot.bin only.
>>>>>
>>>>> Using native compilation with gcc 4.5.2 and binutils 2.21 this patch
>>>>> will result in an unusable u-boot. It halts here after DRAM: ... just
>>>>> like it was before some relocation fixes (regarding binutils).
>>>>
>>>> Which board do you compile?
>>>
>>> Upps, sorry, that one was on a BeagleBoard (armv7, omap3).
>>
>> I've just tried the following to compare make logs of before commit
>> 8aba9dceebb14144e07d19593111ee3a999c37fc on the one hand and after this
>> commit and with the proposed fix on the other hand:
>
> Oh, it seems I've got misunderstood, the patch from Stefano Babic breaks
> u-boot here and not the commit 8aba9dceebb14144e07d19593111ee3a999c37fc.
I think I understood you: what I do is compile without commit 8aba9dce
on the one hand, and with it _plus Stefano's patch_ on the other hand,
in order to see how things compiled before we split LDFLAGS (8aba9dce^)
with how things compile if we split LDFLAGS (8aba9dce) with -pie in the
right place (Stefano's patch).
Can you try that?
> Regards,
>
> Alexander
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 21:40 ` Albert ARIBAUD
@ 2011-01-27 22:19 ` Alexander Holler
2011-01-27 22:37 ` Albert ARIBAUD
2011-01-27 22:44 ` Stefano Babic
0 siblings, 2 replies; 14+ messages in thread
From: Alexander Holler @ 2011-01-27 22:19 UTC (permalink / raw)
To: u-boot
Am 27.01.2011 22:40, schrieb Albert ARIBAUD:
> Le 27/01/2011 22:32, Alexander Holler a ?crit :
>> Am 27.01.2011 22:10, schrieb Albert ARIBAUD:
>>> Le 27/01/2011 21:55, Alexander Holler a ?crit :
>>>> Am 27.01.2011 21:20, schrieb Albert ARIBAUD:
>>>>> Hi Alexander,
>>>>>
>>>>> Le 27/01/2011 20:42, Alexander Holler a ?crit :
>>>>>> Hello,
>>>>>>
>>>>>> Am 27.01.2011 17:03, schrieb Stefano Babic:
>>>>>>> Commit 8aba9dceebb14144e07d19593111ee3a999c37fc breaks
>>>>>>> ARM boards because for ARM the -pie option is used
>>>>>>> for partial linking together with -r option.
>>>>>>>
>>>>>>> The patch adds the -pie option to link u-boot.bin only.
>>>>>>
>>>>>> Using native compilation with gcc 4.5.2 and binutils 2.21 this patch
>>>>>> will result in an unusable u-boot. It halts here after DRAM: ... just
>>>>>> like it was before some relocation fixes (regarding binutils).
>>>>>
>>>>> Which board do you compile?
>>>>
>>>> Upps, sorry, that one was on a BeagleBoard (armv7, omap3).
>>>
>>> I've just tried the following to compare make logs of before commit
>>> 8aba9dceebb14144e07d19593111ee3a999c37fc on the one hand and after this
>>> commit and with the proposed fix on the other hand:
>>
>> Oh, it seems I've got misunderstood, the patch from Stefano Babic breaks
>> u-boot here and not the commit 8aba9dceebb14144e07d19593111ee3a999c37fc.
>
> I think I understood you: what I do is compile without commit 8aba9dce
> on the one hand, and with it _plus Stefano's patch_ on the other hand,
> in order to see how things compiled before we split LDFLAGS (8aba9dce^)
> with how things compile if we split LDFLAGS (8aba9dce) with -pie in the
> right place (Stefano's patch).
>
> Can you try that?
Sorry, again. While hunting another problem I've applied Stefano's patch
but haven't had 8aba9dceebb14144e07d19593111ee3a999c37fc (I was on the
wrong branch here).
I've now rebased to the master (which includes the above commit) and
applied Stefano's patch and it works.
Sorry for the noise.
Regards,
Alexander
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 22:19 ` Alexander Holler
@ 2011-01-27 22:37 ` Albert ARIBAUD
2011-01-27 22:44 ` Stefano Babic
1 sibling, 0 replies; 14+ messages in thread
From: Albert ARIBAUD @ 2011-01-27 22:37 UTC (permalink / raw)
To: u-boot
Le 27/01/2011 23:19, Alexander Holler a ?crit :
> I've now rebased to the master (which includes the above commit) and
> applied Stefano's patch and it works.
>
> Sorry for the noise.
No problems. You can add your Tested-by: to Stefano's first post in this
thread. :)
> Regards,
>
> Alexander
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 16:03 [U-Boot] [PATCH] ARM: fix broken build of ARM Stefano Babic
2011-01-27 19:42 ` Alexander Holler
@ 2011-01-27 22:44 ` Alexander Holler
2011-01-27 22:54 ` Albert ARIBAUD
1 sibling, 1 reply; 14+ messages in thread
From: Alexander Holler @ 2011-01-27 22:44 UTC (permalink / raw)
To: u-boot
Am 27.01.2011 17:03, schrieb Stefano Babic:
> Commit 8aba9dceebb14144e07d19593111ee3a999c37fc breaks
> ARM boards because for ARM the -pie option is used
> for partial linking together with -r option.
>
> The patch adds the -pie option to link u-boot.bin only.
>
> Signed-off-by: Stefano Babic<sbabic@denx.de>
> CC: Jason Liu<liu.h.jason@gmail.com>
> CC: lool at dooz.org
> CC: Wolfgang Denk<wd@denx.de>
> CC: Albert Aribaud<albert.aribaud@free.fr>
Tested-by: Alexander Holler <holler@ahsoftware.de>
Regards,
Alexander
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 22:19 ` Alexander Holler
2011-01-27 22:37 ` Albert ARIBAUD
@ 2011-01-27 22:44 ` Stefano Babic
1 sibling, 0 replies; 14+ messages in thread
From: Stefano Babic @ 2011-01-27 22:44 UTC (permalink / raw)
To: u-boot
On 01/27/2011 11:19 PM, Alexander Holler wrote:
> Sorry, again. While hunting another problem I've applied Stefano's patch
> but haven't had 8aba9dceebb14144e07d19593111ee3a999c37fc (I was on the
> wrong branch here).
> I've now rebased to the master (which includes the above commit) and
> applied Stefano's patch and it works.
>
> Sorry for the noise.
Thanks for testing. I tested again on a ARM11 board, and I have not seen
any problems. However, I tested with an older gcc version, and I could
not exclude issues with gcc 4.5
Regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] ARM: fix broken build of ARM
2011-01-27 22:44 ` Alexander Holler
@ 2011-01-27 22:54 ` Albert ARIBAUD
0 siblings, 0 replies; 14+ messages in thread
From: Albert ARIBAUD @ 2011-01-27 22:54 UTC (permalink / raw)
To: u-boot
Le 27/01/2011 23:44, Alexander Holler a ?crit :
> Am 27.01.2011 17:03, schrieb Stefano Babic:
>> Commit 8aba9dceebb14144e07d19593111ee3a999c37fc breaks
>> ARM boards because for ARM the -pie option is used
>> for partial linking together with -r option.
>>
>> The patch adds the -pie option to link u-boot.bin only.
>>
>> Signed-off-by: Stefano Babic<sbabic@denx.de>
>> CC: Jason Liu<liu.h.jason@gmail.com>
>> CC: lool at dooz.org
>> CC: Wolfgang Denk<wd@denx.de>
>> CC: Albert Aribaud<albert.aribaud@free.fr>
>
> Tested-by: Alexander Holler<holler@ahsoftware.de>
>
> Regards,
>
> Alexander
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Applied to u-boot-arm as this is a fix.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-01-27 22:54 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 16:03 [U-Boot] [PATCH] ARM: fix broken build of ARM Stefano Babic
2011-01-27 19:42 ` Alexander Holler
2011-01-27 20:20 ` Albert ARIBAUD
2011-01-27 20:55 ` Alexander Holler
2011-01-27 21:10 ` Albert ARIBAUD
2011-01-27 21:14 ` Wolfgang Denk
2011-01-27 21:32 ` Albert ARIBAUD
2011-01-27 21:32 ` Alexander Holler
2011-01-27 21:40 ` Albert ARIBAUD
2011-01-27 22:19 ` Alexander Holler
2011-01-27 22:37 ` Albert ARIBAUD
2011-01-27 22:44 ` Stefano Babic
2011-01-27 22:44 ` Alexander Holler
2011-01-27 22:54 ` Albert ARIBAUD
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.