* mips/nullmon.c (_ftext, _end): Adjust declaration.

(get_mem_info): Rework.
This commit is contained in:
Richard Sandiford 2003-02-18 19:37:04 +00:00
parent 325d68a204
commit f4dd8875de
2 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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