Hi Thomas,

Thomas Chou wrote:
The nios2 gcc will group small global variables into "sdata" section,
which uses "gp" reg addressing. So assigning such data to "data" section
will cause address mode conflict in other modules, and caused linking
error.

This patch removed such section attribute, which was used for
optimzation only.

No-one seems to have complained too much, so I'll
go ahead an apply this.

Regards
Greg



Signed-off-by: Thomas Chou <[EMAIL PROTECTED]>
---
 user/busybox/coreutils/test.c  |    2 +-
 user/busybox/libbb/appletlib.c |    2 +-
 user/busybox/libbb/lineedit.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/user/busybox/coreutils/test.c b/user/busybox/coreutils/test.c
index 2f5b6b8..0b1e39c 100644
--- a/user/busybox/coreutils/test.c
+++ b/user/busybox/coreutils/test.c
@@ -169,7 +169,7 @@ struct statics {
/* Make it reside in writable memory, yet make compiler understand
  * that it is not going to change. */
-static struct statics *const ptr_to_statics __attribute__ ((section 
(".data")));
+static struct statics *const ptr_to_statics;
#define S (*ptr_to_statics)
 #define t_wp            (S.t_wp         )
diff --git a/user/busybox/libbb/appletlib.c b/user/busybox/libbb/appletlib.c
index e2bb378..8889d5f 100644
--- a/user/busybox/libbb/appletlib.c
+++ b/user/busybox/libbb/appletlib.c
@@ -120,7 +120,7 @@ int find_applet_by_name(const char *name)
#ifdef __GLIBC__
 /* Make it reside in R/W memory: */
-int *const bb_errno __attribute__ ((section (".data")));
+int *const bb_errno;
 #endif
void lbb_prepare(const char *applet
diff --git a/user/busybox/libbb/lineedit.c b/user/busybox/libbb/lineedit.c
index b05319a..bb26da4 100644
--- a/user/busybox/libbb/lineedit.c
+++ b/user/busybox/libbb/lineedit.c
@@ -122,7 +122,7 @@ struct statics {
/* Make it reside in writable memory, yet make compiler understand
  * that it is not going to change. */
-static struct statics *const ptr_to_statics __attribute__ ((section 
(".data")));
+static struct statics *const ptr_to_statics;
#define S (*ptr_to_statics)
 #define state            (S.state           )

--
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     [EMAIL PROTECTED]
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to