* [U-Boot] [PATCH] Don't inline weak symbols
@ 2009-08-05 18:14 Ron
2009-08-05 21:07 ` Jean-Christophe PLAGNIOL-VILLARD
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Ron @ 2009-08-05 18:14 UTC (permalink / raw)
To: u-boot
GCC 4.4 complains about this now.
Signed-off-by: Ron Lee <ron@debian.org>
---
lib_arm/board.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib_arm/board.c b/lib_arm/board.c
index a44d308..02a55eb 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -124,23 +124,23 @@ void *sbrk (ptrdiff_t increment)
* May be supplied by boards if desired
*/
void inline __coloured_LED_init (void) {}
-void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
+void coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
void inline __red_LED_on (void) {}
-void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
+void red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
void inline __red_LED_off(void) {}
-void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
+void red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
void inline __green_LED_on(void) {}
-void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
+void green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
void inline __green_LED_off(void) {}
-void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
+void green_LED_off(void) __attribute__((weak, alias("__green_LED_off")));
void inline __yellow_LED_on(void) {}
-void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
+void yellow_LED_on(void) __attribute__((weak, alias("__yellow_LED_on")));
void inline __yellow_LED_off(void) {}
-void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
+void yellow_LED_off(void) __attribute__((weak, alias("__yellow_LED_off")));
void inline __blue_LED_on(void) {}
-void inline blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
+void blue_LED_on(void) __attribute__((weak, alias("__blue_LED_on")));
void inline __blue_LED_off(void) {}
-void inline blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
+void blue_LED_off(void) __attribute__((weak, alias("__blue_LED_off")));
/************************************************************************
* Init Utilities *
--
1.6.3.3
^ permalink raw reply related [flat|nested] 8+ messages in thread* [U-Boot] [PATCH] Don't inline weak symbols
2009-08-05 18:14 [U-Boot] [PATCH] Don't inline weak symbols Ron
@ 2009-08-05 21:07 ` Jean-Christophe PLAGNIOL-VILLARD
2009-08-05 21:21 ` Ron
2009-08-07 20:06 ` [U-Boot] [PATCH V2] " Jean-Christophe PLAGNIOL-VILLARD
2009-10-03 21:57 ` [U-Boot] [PATCH] " Wolfgang Denk
2 siblings, 1 reply; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-08-05 21:07 UTC (permalink / raw)
To: u-boot
On 03:44 Thu 06 Aug , Ron wrote:
>
> GCC 4.4 complains about this now.
I'd remove the inline ot all
Best Regards,
J.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] Don't inline weak symbols
2009-08-05 21:07 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-08-05 21:21 ` Ron
0 siblings, 0 replies; 8+ messages in thread
From: Ron @ 2009-08-05 21:21 UTC (permalink / raw)
To: u-boot
On Wed, Aug 05, 2009 at 11:07:35PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 03:44 Thu 06 Aug , Ron wrote:
> >
> > GCC 4.4 complains about this now.
> I'd remove the inline ot all
The compiler likely will already inline/eradicate the defaults there, since
the empty definition is visible to it, so yes, that would be valid too, and
might make that block a bit easier on the eyes :)
Cheers,
Ron
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH V2] Don't inline weak symbols
2009-08-05 18:14 [U-Boot] [PATCH] Don't inline weak symbols Ron
2009-08-05 21:07 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-08-07 20:06 ` Jean-Christophe PLAGNIOL-VILLARD
2009-08-07 21:58 ` Wolfgang Denk
2009-10-03 21:57 ` [U-Boot] [PATCH] " Wolfgang Denk
2 siblings, 1 reply; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-08-07 20:06 UTC (permalink / raw)
To: u-boot
From: Ron Lee <ron@debian.org>
use the same dummy weak functions too
it will save 200 bytes
Signed-off-by: Ron Lee <ron@debian.org>
update the implementation
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
lib_arm/board.c | 28 ++++++++++------------------
1 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/lib_arm/board.c b/lib_arm/board.c
index a44d308..37e4cc9 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -123,24 +123,16 @@ void *sbrk (ptrdiff_t increment)
************************************************************************
* May be supplied by boards if desired
*/
-void inline __coloured_LED_init (void) {}
-void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
-void inline __red_LED_on (void) {}
-void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
-void inline __red_LED_off(void) {}
-void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
-void inline __green_LED_on(void) {}
-void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
-void inline __green_LED_off(void) {}
-void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
-void inline __yellow_LED_on(void) {}
-void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
-void inline __yellow_LED_off(void) {}
-void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
-void inline __blue_LED_on(void) {}
-void inline blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
-void inline __blue_LED_off(void) {}
-void inline blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
+void __coloured_dummy(void) {}
+void coloured_LED_init(void) __attribute__((weak, alias("__coloured_dummy")));
+void red_LED_on(void) __attribute__((weak, alias("__coloured_dummy")));
+void red_LED_off(void) __attribute__((weak, alias("__coloured_dummy")));
+void green_LED_on(void) __attribute__((weak, alias("__coloured_dummy")));
+void green_LED_off(void) __attribute__((weak, alias("__coloured_dummy")));
+void yellow_LED_on(void) __attribute__((weak, alias("__coloured_dummy")));
+void yellow_LED_off(void) __attribute__((weak, alias("__coloured_dummy")));
+void blue_LED_on(void) __attribute__((weak, alias("__coloured_dummy")));
+void blue_LED_off(void) __attribute__((weak, alias("__coloured_dummy")));
/************************************************************************
* Init Utilities *
--
1.6.3.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [U-Boot] [PATCH V2] Don't inline weak symbols
2009-08-07 20:06 ` [U-Boot] [PATCH V2] " Jean-Christophe PLAGNIOL-VILLARD
@ 2009-08-07 21:58 ` Wolfgang Denk
2009-08-07 22:04 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2009-08-07 21:58 UTC (permalink / raw)
To: u-boot
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message <1249675613-10949-1-git-send-email-plagnioj@jcrosoft.com> you wrote:
> From: Ron Lee <ron@debian.org>
>
> use the same dummy weak functions too
> it will save 200 bytes
>
> Signed-off-by: Ron Lee <ron@debian.org>
>
> update the implementation
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> lib_arm/board.c | 28 ++++++++++------------------
> 1 files changed, 10 insertions(+), 18 deletions(-)
This whole stuff should be #ifdef'ed and only included when some board
actually uses such a feature.
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 day," said a dull voice from down below, "I'm going to be back
in form again and you're going to be very sorry you said that. For a
very long time. I might even go so far as to make even more Time just
for you to be sorry in." - Terry Pratchett, _Small Gods_
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH V2] Don't inline weak symbols
2009-08-07 21:58 ` Wolfgang Denk
@ 2009-08-07 22:04 ` Jean-Christophe PLAGNIOL-VILLARD
2009-08-07 23:34 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-08-07 22:04 UTC (permalink / raw)
To: u-boot
On 23:58 Fri 07 Aug , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
>
> In message <1249675613-10949-1-git-send-email-plagnioj@jcrosoft.com> you wrote:
> > From: Ron Lee <ron@debian.org>
> >
> > use the same dummy weak functions too
> > it will save 200 bytes
> >
> > Signed-off-by: Ron Lee <ron@debian.org>
> >
> > update the implementation
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > ---
> > lib_arm/board.c | 28 ++++++++++------------------
> > 1 files changed, 10 insertions(+), 18 deletions(-)
>
> This whole stuff should be #ifdef'ed and only included when some board
> actually uses such a feature.
the current patch is a fix for gcc 4.4
such update could be done later as we need to touch a lot's of file c and
assembly
Best Regards,
J.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH V2] Don't inline weak symbols
2009-08-07 22:04 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-08-07 23:34 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-08-07 23:34 UTC (permalink / raw)
To: u-boot
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message <20090807220403.GS13346@game.jcrosoft.org> you wrote:
>
> > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > > ---
> > > lib_arm/board.c | 28 ++++++++++------------------
> > > 1 files changed, 10 insertions(+), 18 deletions(-)
> >
> > This whole stuff should be #ifdef'ed and only included when some board
> > actually uses such a feature.
> the current patch is a fix for gcc 4.4
>
> such update could be done later as we need to touch a lot's of file c and
> assembly
We could also do the change to lib_arm/board.c right now. This should
not affect any other boards or files.
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
"The more data I punch in this card, the lighter it becomes, and the
lower the mailing cost."
- Stan Kelly-Bootle, "The Devil's DP Dictionary"
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] Don't inline weak symbols
2009-08-05 18:14 [U-Boot] [PATCH] Don't inline weak symbols Ron
2009-08-05 21:07 ` Jean-Christophe PLAGNIOL-VILLARD
2009-08-07 20:06 ` [U-Boot] [PATCH V2] " Jean-Christophe PLAGNIOL-VILLARD
@ 2009-10-03 21:57 ` Wolfgang Denk
2 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-10-03 21:57 UTC (permalink / raw)
To: u-boot
Dear Tom,
In message <20090805181400.GG11898@audi.shelbyville.oz> Ron Lee wrote:
>
> GCC 4.4 complains about this now.
>
> Signed-off-by: Ron Lee <ron@debian.org>
> ---
> lib_arm/board.c | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/lib_arm/board.c b/lib_arm/board.c
> index a44d308..02a55eb 100644
> --- a/lib_arm/board.c
> +++ b/lib_arm/board.c
> @@ -124,23 +124,23 @@ void *sbrk (ptrdiff_t increment)
> * May be supplied by boards if desired
> */
> void inline __coloured_LED_init (void) {}
> -void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
> +void coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
> void inline __red_LED_on (void) {}
> -void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
> +void red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
> void inline __red_LED_off(void) {}
> -void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
> +void red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
> void inline __green_LED_on(void) {}
> -void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
> +void green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
> void inline __green_LED_off(void) {}
> -void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
> +void green_LED_off(void) __attribute__((weak, alias("__green_LED_off")));
> void inline __yellow_LED_on(void) {}
> -void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
> +void yellow_LED_on(void) __attribute__((weak, alias("__yellow_LED_on")));
> void inline __yellow_LED_off(void) {}
> -void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
> +void yellow_LED_off(void) __attribute__((weak, alias("__yellow_LED_off")));
> void inline __blue_LED_on(void) {}
> -void inline blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
> +void blue_LED_on(void) __attribute__((weak, alias("__blue_LED_on")));
> void inline __blue_LED_off(void) {}
> -void inline blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
> +void blue_LED_off(void) __attribute__((weak, alias("__blue_LED_off")));
>
> /************************************************************************
> * Init Utilities *
> --
Do you have this patch on your list?
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
Humans do claim a great deal for that particular emotion (love).
-- Spock, "The Lights of Zetar", stardate 5725.6
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-10-03 21:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-05 18:14 [U-Boot] [PATCH] Don't inline weak symbols Ron
2009-08-05 21:07 ` Jean-Christophe PLAGNIOL-VILLARD
2009-08-05 21:21 ` Ron
2009-08-07 20:06 ` [U-Boot] [PATCH V2] " Jean-Christophe PLAGNIOL-VILLARD
2009-08-07 21:58 ` Wolfgang Denk
2009-08-07 22:04 ` Jean-Christophe PLAGNIOL-VILLARD
2009-08-07 23:34 ` Wolfgang Denk
2009-10-03 21:57 ` [U-Boot] [PATCH] " Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox