* [U-Boot] current head don;t compile for mpc52xx based boards
@ 2011-03-28 6:20 Heiko Schocher
2011-03-28 6:33 ` Wolfgang Denk
0 siblings, 1 reply; 17+ messages in thread
From: Heiko Schocher @ 2011-03-28 6:20 UTC (permalink / raw)
To: u-boot
Hello,
actual head doesn;t longer compile for the mpc52xx based
digsy_mtc_rev5 board (and a fast check, it seems it is
for mp52xx, 8xx, ppc4xx based boards):
[hs at pollux u-boot]$ ./MAKEALL digsy_mtc_rev5
Configuring for digsy_mtc_rev5 - Board: digsy_mtc, Options: DIGSY_REV5
libstubs.o: In function `app_startup':
/home/hs/charon/u-boot/examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
/home/hs/charon/u-boot/examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
make[1]: *** [hello_world] Fehler 1
make: *** [examples/standalone] Fehler 2
make: *** Warte auf noch nicht beendete Prozesse...
ppc_6xx-size: './u-boot': No such file
--------------------- SUMMARY ----------------------------
Boards compiled: 1
Boards with warnings or errors: 1 ( digsy_mtc_rev5 )
----------------------------------------------------------
[hs at pollux u-boot]$
bisection it a bit shows:
[hs at pollux u-boot]$ git bisect good
44c6e6591cb451ae606f8bde71dd5fb7b4002544 is the first bad commit
commit 44c6e6591cb451ae606f8bde71dd5fb7b4002544
Author: Po-Yu Chuang <ratbert@faraday-tech.com>
Date: Tue Mar 1 22:59:59 2011 +0000
rename _end to __bss_end__
Currently, _end is used for end of BSS section. We want _end to mean
end of u-boot image, so we rename _end to __bss_end__ first.
Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
:040000 040000 9c41e6ba008d29cdb82ecfadea40f224a9c4771e 05f2d7e2e04bef1988ef537f47e7026e4a88a2a8 M arch
:040000 040000 e8a97103de34f63145918cc1f119616c5deb8f22 c81f1ef95f863d263f8da1e80a97fdb8361cfe90 M board
:040000 040000 29dc021a9988488c841b89c6bf6fab915584ce22 f6db95bc3432104adc5c993aafd7e410dd8f5d9b M examples
:040000 040000 96fa70b40a37090b75e4b66df7d1fb61d120f198 faa9863deb077cfca92d31ec93c4b84a2e3f2e1d M nand_spl
:040000 040000 927f744a35280f707a9b03059839e0dca45fecb5 6d7771394e8eb1f184dcb24a96453eadc9306c12 M onenand_ipl
[hs at pollux u-boot]$
If I find time, I look in it, but if somebody has an idea,
it would be great!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] current head don;t compile for mpc52xx based boards
2011-03-28 6:20 [U-Boot] current head don;t compile for mpc52xx based boards Heiko Schocher
@ 2011-03-28 6:33 ` Wolfgang Denk
2011-03-28 7:29 ` Po-Yu Chuang
0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Denk @ 2011-03-28 6:33 UTC (permalink / raw)
To: u-boot
Dear Heiko Schocher,
In message <4D90289F.2000401@denx.de> you wrote:
>
> actual head doesn;t longer compile for the mpc52xx based
> digsy_mtc_rev5 board (and a fast check, it seems it is
> for mp52xx, 8xx, ppc4xx based boards):
I think ALL PowerPC boards are affecte.
Po-Yu Chuang, can you please look into this, it's urgent?
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
Felson's Law:
To steal ideas from one person is plagiarism; to steal from
many is research.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] current head don;t compile for mpc52xx based boards
2011-03-28 6:33 ` Wolfgang Denk
@ 2011-03-28 7:29 ` Po-Yu Chuang
2011-03-28 8:40 ` [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename Wolfgang Denk
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Po-Yu Chuang @ 2011-03-28 7:29 UTC (permalink / raw)
To: u-boot
Hi Heiko and Wolfgang,
On Mon, Mar 28, 2011 at 2:33 PM, Wolfgang Denk <wd@denx.de> wrote:
> In message <4D90289F.2000401@denx.de> you wrote:
> >
> > actual head doesn;t longer compile for the mpc52xx based
> > digsy_mtc_rev5 board (and a fast check, it seems it is
> > for mp52xx, 8xx, ppc4xx based boards):
Could you use objdump to check what is the symbol name for end of BSS
defined by ppc toolchain? I don't have the environment now.
> I think ALL PowerPC boards are affecte.
>
> Po-Yu Chuang, can you please look into this, it's urgent?
It seems that we need to find a symbol name globally accepted by
all toolchains of all platform. If we rename it to another name careless,
we might get the same problem on another platform. Or maybe we can
just rename the one used in standalone examples back to _end?
Any suggestion?
Best regards,
Po-Yu Chuang
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-28 7:29 ` Po-Yu Chuang
@ 2011-03-28 8:40 ` Wolfgang Denk
2011-03-28 8:48 ` Po-Yu Chuang
2011-03-28 16:42 ` Albert ARIBAUD
2011-03-28 8:43 ` [U-Boot] [RFC PATCH] rename __bss_end__ back to _end for standalone programs Po-Yu Chuang
2011-03-28 8:52 ` [U-Boot] current head don;t compile for mpc52xx based boards Wolfgang Denk
2 siblings, 2 replies; 17+ messages in thread
From: Wolfgang Denk @ 2011-03-28 8:40 UTC (permalink / raw)
To: u-boot
Commit 44c6e65 "rename _end to __bss_end__ broke building of a large
number of systems (at least all PowerPC?):
libstubs.o: In function `app_startup':
examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
As a workaround (instead of introducing linker scripts) we can
add a --defsym=__bss_end__=_end
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Po-Yu Chuang <ratbert@faraday-tech.com>
Cc: Albert Aribaud <albert.aribaud@free.fr>
---
What I really do not understand is why we don't see the same type of
undefined reference errors on ARM? ALso, on ARM we see __bss_end__
and _bss_end__, and __bss_start und __bss_start__ - where are the
other names coming from? [On PPC we see only __bss_start and
__bss_end__].
examples/standalone/Makefile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
index c1dfdce..06cf14f 100644
--- a/examples/standalone/Makefile
+++ b/examples/standalone/Makefile
@@ -96,6 +96,7 @@ $(LIB): $(obj).depend $(LIBOBJS)
$(ELF):
$(obj)%: $(obj)%.o $(LIB)
$(LD) -g -Ttext $(STANDALONE_LOAD_ADDR) \
+ --defsym=__bss_end__=_end \
-o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
-L$(gcclibdir) -lgcc
--
1.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [U-Boot] [RFC PATCH] rename __bss_end__ back to _end for standalone programs
2011-03-28 7:29 ` Po-Yu Chuang
2011-03-28 8:40 ` [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename Wolfgang Denk
@ 2011-03-28 8:43 ` Po-Yu Chuang
2011-03-31 6:55 ` Wolfgang Denk
2011-03-28 8:52 ` [U-Boot] current head don;t compile for mpc52xx based boards Wolfgang Denk
2 siblings, 1 reply; 17+ messages in thread
From: Po-Yu Chuang @ 2011-03-28 8:43 UTC (permalink / raw)
To: u-boot
From: Po-Yu Chuang <ratbert@faraday-tech.com>
It seems __bss_end__ is not a true convention for all toolchains,
at least not for PPC. Using _end for standalone programs might be
the simplest way to fix this problem.
One of the other choices may be writing a linker script to provide
__bss_end__ for PPC.
Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
---
Hi all,
Not sure if this is the best solution, but I think this
could fix Heiko's problem.
examples/standalone/mips.lds | 2 +-
examples/standalone/sparc.lds | 2 +-
examples/standalone/stubs.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/standalone/mips.lds b/examples/standalone/mips.lds
index 68ae217..63a1c92 100644
--- a/examples/standalone/mips.lds
+++ b/examples/standalone/mips.lds
@@ -55,5 +55,5 @@ SECTIONS
.sbss (NOLOAD) : { *(.sbss) }
.bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
- __bss_end__ = .;
+ _end = .;
}
diff --git a/examples/standalone/sparc.lds b/examples/standalone/sparc.lds
index 7f060b6..9733daa 100644
--- a/examples/standalone/sparc.lds
+++ b/examples/standalone/sparc.lds
@@ -57,5 +57,5 @@ SECTIONS
}
. = ALIGN(4);
__bss_end = .;
- __bss_end__ = .;
+ _end = .;
}
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index 1379df7..2d2e709 100644
--- a/examples/standalone/stubs.c
+++ b/examples/standalone/stubs.c
@@ -187,14 +187,14 @@ void __attribute__((unused)) dummy(void)
#include <_exports.h>
}
-extern unsigned long __bss_start, __bss_end__;
+extern unsigned long __bss_start, _end;
void app_startup(char * const *argv)
{
unsigned char * cp = (unsigned char *) &__bss_start;
/* Zero out BSS */
- while (cp < (unsigned char *)&__bss_end__) {
+ while (cp < (unsigned char *)&_end) {
*cp++ = 0;
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-28 8:40 ` [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename Wolfgang Denk
@ 2011-03-28 8:48 ` Po-Yu Chuang
2011-03-28 8:54 ` Wolfgang Denk
2011-03-28 16:42 ` Albert ARIBAUD
1 sibling, 1 reply; 17+ messages in thread
From: Po-Yu Chuang @ 2011-03-28 8:48 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
On Mon, Mar 28, 2011 at 4:40 PM, Wolfgang Denk <wd@denx.de> wrote:
> Commit 44c6e65 "rename _end to __bss_end__ broke building of a large
> number of systems (at least all PowerPC?):
>
> libstubs.o: In function `app_startup':
> examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
>
> As a workaround (instead of introducing linker scripts) we can
> add a --defsym=__bss_end__=_end
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Po-Yu Chuang <ratbert@faraday-tech.com>
> Cc: Albert Aribaud <albert.aribaud@free.fr>
> ---
>
>
> What I really do not understand is why we don't see the same type of
> undefined reference errors on ARM? ?ALso, on ARM we see __bss_end__
> and _bss_end__, and __bss_start und __bss_start__ - where are the
> other names coming from? [On PPC we see only __bss_start and
> __bss_end__].
Do you mean _end here? If there is __bss_end__ on PPC, then there is
no problem, right?
> ?examples/standalone/Makefile | ? ?1 +
> ?1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
> index c1dfdce..06cf14f 100644
> --- a/examples/standalone/Makefile
> +++ b/examples/standalone/Makefile
> @@ -96,6 +96,7 @@ $(LIB): ? ? ? $(obj).depend $(LIBOBJS)
> ?$(ELF):
> ?$(obj)%: ? ? ? $(obj)%.o $(LIB)
> ? ? ? ? ? ? ? ?$(LD) -g -Ttext $(STANDALONE_LOAD_ADDR) \
> + ? ? ? ? ? ? ? ? ? ? ? --defsym=__bss_end__=_end \
> ? ? ? ? ? ? ? ? ? ? ? ?-o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
> ? ? ? ? ? ? ? ? ? ? ? ?-L$(gcclibdir) -lgcc
>
> --
> 1.7.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] current head don;t compile for mpc52xx based boards
2011-03-28 7:29 ` Po-Yu Chuang
2011-03-28 8:40 ` [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename Wolfgang Denk
2011-03-28 8:43 ` [U-Boot] [RFC PATCH] rename __bss_end__ back to _end for standalone programs Po-Yu Chuang
@ 2011-03-28 8:52 ` Wolfgang Denk
2 siblings, 0 replies; 17+ messages in thread
From: Wolfgang Denk @ 2011-03-28 8:52 UTC (permalink / raw)
To: u-boot
Dear Po-Yu Chuang,
In message <AANLkTinnwR4sUAgiAsgSPB1MEJy8eT5rpHiJVSXShj2=@mail.gmail.com> you wrote:
>
> Could you use objdump to check what is the symbol name for end of BSS
> defined by ppc toolchain? I don't have the environment now.
It appears there is no default value used - we get what we define in
the linker scripts, and (apparently) nothing else.
> It seems that we need to find a symbol name globally accepted by
> all toolchains of all platform. If we rename it to another name careless,
> we might get the same problem on another platform. Or maybe we can
> just rename the one used in standalone examples back to _end?
I don;t really understand what's going on there on ARM - see my RC
patch.
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
One of the advantages of being a captain is being able to ask for ad-
vice without necessarily having to take it.
-- Kirk, "Dagger of the Mind", stardate 2715.2
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-28 8:48 ` Po-Yu Chuang
@ 2011-03-28 8:54 ` Wolfgang Denk
2011-03-28 9:07 ` Po-Yu Chuang
0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Denk @ 2011-03-28 8:54 UTC (permalink / raw)
To: u-boot
Dear Po-Yu Chuang,
In message <AANLkTin6cEHSQSquvocW_kXr4-dbtnUGu9XZzEJiTdJ_@mail.gmail.com> you wrote:
>
> > What I really do not understand is why we don't see the same type of
> > undefined reference errors on ARM? =C2=A0ALso, on ARM we see __bss_end__
> > and _bss_end__, and __bss_start und __bss_start__ - where are the
> > other names coming from? [On PPC we see only __bss_start and
> > __bss_end__].
>
> Do you mean _end here? If there is __bss_end__ on PPC, then there is
> no problem, right?
No, I mean exactly what I wrote. On PPC I do not see any _end (with
your previous patch), only the symbols defined in the linker script.
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
"Where humor is concerned there are no standards -- no one can say
what is good or bad, although you can be sure that everyone will.
- John Kenneth Galbraith
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-28 8:54 ` Wolfgang Denk
@ 2011-03-28 9:07 ` Po-Yu Chuang
2011-03-28 10:25 ` Wolfgang Denk
0 siblings, 1 reply; 17+ messages in thread
From: Po-Yu Chuang @ 2011-03-28 9:07 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
On Mon, Mar 28, 2011 at 4:54 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Po-Yu Chuang,
>
> In message <AANLkTin6cEHSQSquvocW_kXr4-dbtnUGu9XZzEJiTdJ_@mail.gmail.com> you wrote:
>>
>> > What I really do not understand is why we don't see the same type of
>> > undefined reference errors on ARM? =C2=A0ALso, on ARM we see __bss_end__
>> > and _bss_end__, and __bss_start und __bss_start__ - where are the
>> > other names coming from? [On PPC we see only __bss_start and
>> > __bss_end__].
>>
>> Do you mean _end here? If there is __bss_end__ on PPC, then there is
>> no problem, right?
>
> No, I mean exactly what I wrote. On PPC I do not see any _end (with
> your previous patch), only the symbols defined in the linker script.
All those symbols come from default linker script in one of
${toolchain}/arm-none-linux-gnueabi/lib/ldscripts/armelfb_linux_eabi.*.
It defines __bss_start, __bss_start__, _bss_end__ and __bss_end__.
Is ARM the only platform doing this?
Best regards,
Po-Yu Chuang
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-28 9:07 ` Po-Yu Chuang
@ 2011-03-28 10:25 ` Wolfgang Denk
0 siblings, 0 replies; 17+ messages in thread
From: Wolfgang Denk @ 2011-03-28 10:25 UTC (permalink / raw)
To: u-boot
Dear Po-Yu Chuang,
In message <AANLkTik-a8oL2CEnb3wf43uwd0r0MGCy8Nnu5DmTWwzw@mail.gmail.com> you wrote:
>
> > No, I mean exactly what I wrote. On PPC I do not see any _end (with
> > your previous patch), only the symbols defined in the linker script.
>
> All those symbols come from default linker script in one of
> ${toolchain}/arm-none-linux-gnueabi/lib/ldscripts/armelfb_linux_eabi.*.
>
> It defines __bss_start, __bss_start__, _bss_end__ and __bss_end__.
> Is ARM the only platform doing this?
No. Not even ARM is doing this in general. It's your specific tool
chain that does it this way.
It appears that ARM has both *bss_start* and *bss_end*, while PPC has
only __bss_start (and __sbss_start and ___sbss_start), but no
*bss_end (there are __sbss_end and ___sbss_end, though).
I have no idea if there is any rationale for this inconsistency or if
it's a bug.
Verified with both ELDK 4.2 and recent Yocto/Poky tool chains.
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
I think there's a world market for about five computers.
-- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-28 8:40 ` [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename Wolfgang Denk
2011-03-28 8:48 ` Po-Yu Chuang
@ 2011-03-28 16:42 ` Albert ARIBAUD
2011-03-29 12:39 ` Wolfgang Denk
2011-03-29 12:39 ` [U-Boot] [PATCH RFC v2] " Wolfgang Denk
1 sibling, 2 replies; 17+ messages in thread
From: Albert ARIBAUD @ 2011-03-28 16:42 UTC (permalink / raw)
To: u-boot
Le 28/03/2011 10:40, Wolfgang Denk a ?crit :
> Commit 44c6e65 "rename _end to __bss_end__ broke building of a large
> number of systems (at least all PowerPC?):
>
> libstubs.o: In function `app_startup':
> examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
>
> As a workaround (instead of introducing linker scripts) we can
> add a --defsym=__bss_end__=_end
>
> Signed-off-by: Wolfgang Denk<wd@denx.de>
> Cc: Po-Yu Chuang<ratbert@faraday-tech.com>
> Cc: Albert Aribaud<albert.aribaud@free.fr>
> ---
Hmm... The change from _end to __bss_end__ should not have been applied
to the standalone apps, I believe. They are not compiled with start.S
but with the standard lib, which will use _end.
> What I really do not understand is why we don't see the same type of
> undefined reference errors on ARM? ALso, on ARM we see __bss_end__
> and _bss_end__, and __bss_start und __bss_start__ - where are the
> other names coming from? [On PPC we see only __bss_start and
> __bss_end__].
I believe these come from the toolchain's standard lib.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-28 16:42 ` Albert ARIBAUD
@ 2011-03-29 12:39 ` Wolfgang Denk
2011-03-29 12:39 ` [U-Boot] [PATCH RFC v2] " Wolfgang Denk
1 sibling, 0 replies; 17+ messages in thread
From: Wolfgang Denk @ 2011-03-29 12:39 UTC (permalink / raw)
To: u-boot
Dear Albert ARIBAUD,
In message <4D90BA8B.3080200@free.fr> you wrote:
>
> > Commit 44c6e65 "rename _end to __bss_end__ broke building of a large
> > number of systems (at least all PowerPC?):
> >
> > libstubs.o: In function `app_startup':
> > examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
...
> Hmm... The change from _end to __bss_end__ should not have been applied
> to the standalone apps, I believe. They are not compiled with start.S
> but with the standard lib, which will use _end.
Good point. Will send an updated patch.
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
Any sufficiently advanced bug is indistinguishable from a feature.
- Rich Kulawiec
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC v2] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-28 16:42 ` Albert ARIBAUD
2011-03-29 12:39 ` Wolfgang Denk
@ 2011-03-29 12:39 ` Wolfgang Denk
2011-03-29 19:51 ` Wolfgang Denk
1 sibling, 1 reply; 17+ messages in thread
From: Wolfgang Denk @ 2011-03-29 12:39 UTC (permalink / raw)
To: u-boot
Commit 44c6e65 "rename _end to __bss_end__ broke building of a large
number of systems (at least all PowerPC?):
libstubs.o: In function `app_startup':
examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
The rename should not be done for the files in the
examples/standalone/ directory, as these are not using the code from
start.S, but do their own BSS clearing, and either use their own
linker scripts or the ones provided by the compilers.
Signed-off-by: Wolfgang Denk <wd@denx.de>
---
V2: Instead of messing with linker defines, revert the patch in
question for the files in examples/standalone/ as suggested by
Albert Aribaud. (Thanks!)
examples/standalone/mips.lds | 2 +-
examples/standalone/sparc.lds | 2 +-
examples/standalone/stubs.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/standalone/mips.lds b/examples/standalone/mips.lds
index 68ae217..63a1c92 100644
--- a/examples/standalone/mips.lds
+++ b/examples/standalone/mips.lds
@@ -55,5 +55,5 @@ SECTIONS
.sbss (NOLOAD) : { *(.sbss) }
.bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
- __bss_end__ = .;
+ _end = .;
}
diff --git a/examples/standalone/sparc.lds b/examples/standalone/sparc.lds
index 7f060b6..9733daa 100644
--- a/examples/standalone/sparc.lds
+++ b/examples/standalone/sparc.lds
@@ -57,5 +57,5 @@ SECTIONS
}
. = ALIGN(4);
__bss_end = .;
- __bss_end__ = .;
+ _end = .;
}
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index 1379df7..2d2e709 100644
--- a/examples/standalone/stubs.c
+++ b/examples/standalone/stubs.c
@@ -187,14 +187,14 @@ void __attribute__((unused)) dummy(void)
#include <_exports.h>
}
-extern unsigned long __bss_start, __bss_end__;
+extern unsigned long __bss_start, _end;
void app_startup(char * const *argv)
{
unsigned char * cp = (unsigned char *) &__bss_start;
/* Zero out BSS */
- while (cp < (unsigned char *)&__bss_end__) {
+ while (cp < (unsigned char *)&_end) {
*cp++ = 0;
}
--
1.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC v2] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-29 12:39 ` [U-Boot] [PATCH RFC v2] " Wolfgang Denk
@ 2011-03-29 19:51 ` Wolfgang Denk
2011-03-30 1:38 ` Po-Yu Chuang
0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Denk @ 2011-03-29 19:51 UTC (permalink / raw)
To: u-boot
Dear Po-Yu Chuang,
In message <1301402371-8697-1-git-send-email-wd@denx.de> I wrote:
> Commit 44c6e65 "rename _end to __bss_end__ broke building of a large
> number of systems (at least all PowerPC?):
>
> libstubs.o: In function `app_startup':
> examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
>
> The rename should not be done for the files in the
> examples/standalone/ directory, as these are not using the code from
> start.S, but do their own BSS clearing, and either use their own
> linker scripts or the ones provided by the compilers.
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> V2: Instead of messing with linker defines, revert the patch in
> question for the files in examples/standalone/ as suggested by
> Albert Aribaud. (Thanks!)
Only now I realize that you submitted the very same patch before.
Stupid me.
Does that mean that we have an agreement that this hould be the fix
then? If yes, I would like to pull this in (Po-Yu Chuang's patch,
that is).
Do you agree?
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
A weak mind is like a microscope, which magnifies trifling things,
but cannot receive great ones. -- Philip Earl of Chesterfield
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC v2] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-29 19:51 ` Wolfgang Denk
@ 2011-03-30 1:38 ` Po-Yu Chuang
2011-03-31 5:37 ` Kumar Gala
0 siblings, 1 reply; 17+ messages in thread
From: Po-Yu Chuang @ 2011-03-30 1:38 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
On Wed, Mar 30, 2011 at 3:51 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Po-Yu Chuang,
>
> In message <1301402371-8697-1-git-send-email-wd@denx.de> I wrote:
>> Commit 44c6e65 "rename _end to __bss_end__ broke building of a large
>> number of systems (at least all PowerPC?):
>>
>> libstubs.o: In function `app_startup':
>> examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
>>
>> The rename should not be done for the files in the
>> examples/standalone/ directory, as these are not using the code from
>> start.S, but do their own BSS clearing, and either use their own
>> linker scripts or the ones provided by the compilers.
>>
>> Signed-off-by: Wolfgang Denk <wd@denx.de>
>> ---
>> V2: ? Instead of messing with linker defines, revert the patch in
>> ? ? ? question for the files in examples/standalone/ as suggested by
>> ? ? ? Albert Aribaud. (Thanks!)
>
> Only now I realize that you submitted the very same patch before.
> Stupid me.
>
> Does that mean that we have an agreement that this hould be the fix
> then? ?If yes, I would like to pull this in (Po-Yu Chuang's patch,
> that is).
>
> Do you agree?
Your commit message is better. Please just use your v2 as is. :-)
Thanks,
Po-Yu Chuang
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH RFC v2] Fix build problems caused by "_end" -> "__bss_end__" rename
2011-03-30 1:38 ` Po-Yu Chuang
@ 2011-03-31 5:37 ` Kumar Gala
0 siblings, 0 replies; 17+ messages in thread
From: Kumar Gala @ 2011-03-31 5:37 UTC (permalink / raw)
To: u-boot
On Mar 29, 2011, at 8:38 PM, Po-Yu Chuang wrote:
> Hi Wolfgang,
>
> On Wed, Mar 30, 2011 at 3:51 AM, Wolfgang Denk <wd@denx.de> wrote:
>> Dear Po-Yu Chuang,
>>
>> In message <1301402371-8697-1-git-send-email-wd@denx.de> I wrote:
>>> Commit 44c6e65 "rename _end to __bss_end__ broke building of a large
>>> number of systems (at least all PowerPC?):
>>>
>>> libstubs.o: In function `app_startup':
>>> examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
>>>
>>> The rename should not be done for the files in the
>>> examples/standalone/ directory, as these are not using the code from
>>> start.S, but do their own BSS clearing, and either use their own
>>> linker scripts or the ones provided by the compilers.
>>>
>>> Signed-off-by: Wolfgang Denk <wd@denx.de>
>>> ---
>>> V2: Instead of messing with linker defines, revert the patch in
>>> question for the files in examples/standalone/ as suggested by
>>> Albert Aribaud. (Thanks!)
>>
>> Only now I realize that you submitted the very same patch before.
>> Stupid me.
>>
>> Does that mean that we have an agreement that this hould be the fix
>> then? If yes, I would like to pull this in (Po-Yu Chuang's patch,
>> that is).
>>
>> Do you agree?
>
> Your commit message is better. Please just use your v2 as is. :-)
We putting this into the tree, would be nice to have builds working again ;)
- k
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [RFC PATCH] rename __bss_end__ back to _end for standalone programs
2011-03-28 8:43 ` [U-Boot] [RFC PATCH] rename __bss_end__ back to _end for standalone programs Po-Yu Chuang
@ 2011-03-31 6:55 ` Wolfgang Denk
0 siblings, 0 replies; 17+ messages in thread
From: Wolfgang Denk @ 2011-03-31 6:55 UTC (permalink / raw)
To: u-boot
Dear Po-Yu Chuang,
In message <1301301782-1644-1-git-send-email-ratbert.chuang@gmail.com> you wrote:
> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>
> It seems __bss_end__ is not a true convention for all toolchains,
> at least not for PPC. Using _end for standalone programs might be
> the simplest way to fix this problem.
>
> One of the other choices may be writing a linker script to provide
> __bss_end__ for PPC.
>
> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
> ---
> Hi all,
>
> Not sure if this is the best solution, but I think this
> could fix Heiko's problem.
>
> examples/standalone/mips.lds | 2 +-
> examples/standalone/sparc.lds | 2 +-
> examples/standalone/stubs.c | 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
Applied, with updated changelog as discussed. Thanks.
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
Objects in mirror are closer than they appear.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2011-03-31 6:55 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 6:20 [U-Boot] current head don;t compile for mpc52xx based boards Heiko Schocher
2011-03-28 6:33 ` Wolfgang Denk
2011-03-28 7:29 ` Po-Yu Chuang
2011-03-28 8:40 ` [U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename Wolfgang Denk
2011-03-28 8:48 ` Po-Yu Chuang
2011-03-28 8:54 ` Wolfgang Denk
2011-03-28 9:07 ` Po-Yu Chuang
2011-03-28 10:25 ` Wolfgang Denk
2011-03-28 16:42 ` Albert ARIBAUD
2011-03-29 12:39 ` Wolfgang Denk
2011-03-29 12:39 ` [U-Boot] [PATCH RFC v2] " Wolfgang Denk
2011-03-29 19:51 ` Wolfgang Denk
2011-03-30 1:38 ` Po-Yu Chuang
2011-03-31 5:37 ` Kumar Gala
2011-03-28 8:43 ` [U-Boot] [RFC PATCH] rename __bss_end__ back to _end for standalone programs Po-Yu Chuang
2011-03-31 6:55 ` Wolfgang Denk
2011-03-28 8:52 ` [U-Boot] current head don;t compile for mpc52xx based boards Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox