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.
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 )
--
1.5.3.3
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev