aboutsummaryrefslogtreecommitdiff
path: root/libgloss
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2003-02-18 19:37:04 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2003-02-18 19:37:04 +0000
commitf4dd8875dead42e6939a220fc6d586b90ec2f8f9 (patch)
tree1099c026e217224b3eede522d2a7a91eb8776337 /libgloss
parent325d68a204d2d4eb4fd91cf532726b9aaf40496b (diff)
downloadnewlib-f4dd8875dead42e6939a220fc6d586b90ec2f8f9.zip
newlib-f4dd8875dead42e6939a220fc6d586b90ec2f8f9.tar.gz
newlib-f4dd8875dead42e6939a220fc6d586b90ec2f8f9.tar.bz2
* mips/nullmon.c (_ftext, _end): Adjust declaration.
(get_mem_info): Rework.
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/ChangeLog5
-rw-r--r--libgloss/mips/nullmon.c13
2 files changed, 9 insertions, 9 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index db382d9..b25e9ea 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -1,5 +1,10 @@
2003-02-18 Richard Sandiford <rsandifo@redhat.com>
+ * mips/nullmon.c (_ftext, _end): Adjust declaration.
+ (get_mem_info): Rework.
+
+2003-02-18 Richard Sandiford <rsandifo@redhat.com>
+
* mips/crt0.S (zerobss): Reload __memsize after call.
2003-02-17 Chris Demetriou <cgd@broadcom.com>
diff --git a/libgloss/mips/nullmon.c b/libgloss/mips/nullmon.c
index 12a157e..0b519bf 100644
--- a/libgloss/mips/nullmon.c
+++ b/libgloss/mips/nullmon.c
@@ -32,8 +32,8 @@
#if ! defined(BOARD_MEM_SIZE)
#define BOARD_MEM_SIZE 0x100000 /* About a megabyte */
#endif
-extern unsigned char _ftext ; /* Defined in nullmon.ld */
-extern unsigned char _end ; /* Defined in nullmon.ld */
+extern char _ftext[]; /* Defined in nullmon.ld */
+extern char _end[]; /* Defined in nullmon.ld */
#if defined(FIXME_WARNINGS)
#warning("FIXME: struct s_mem belongs in a header file")
@@ -47,13 +47,8 @@ struct s_mem
void
get_mem_info (mem)
struct s_mem *mem;
-{ char * t1, * t2 ;
- unsigned long long tmp ;
- t1 = & _ftext ;
- t2 = & _end ;
- tmp = (unsigned long long) (t2 - t1) ;
- tmp = (unsigned long long) BOARD_MEM_SIZE - tmp ;
- mem->size = tmp ;
+{
+ mem->size = BOARD_MEM_SIZE - (_end - _ftext);
}
/* SYSTEM INTERFACE