diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index f31f405d2..cd8af5f5e 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,8 @@ +2014-02-11 Joey Ye + + * arm/syscalls.c (_sbrk): Define as weak symbols. + (_read, _write): Ditto. + 2014-02-03 Richard Earnshaw * aarch64/Makefile.in (RDIMON_SCRIPTS): Rule to build in-tree copies diff --git a/libgloss/arm/syscalls.c b/libgloss/arm/syscalls.c index 15cc69f61..54e3d74f0 100644 --- a/libgloss/arm/syscalls.c +++ b/libgloss/arm/syscalls.c @@ -264,10 +264,10 @@ _swiread (int fh, #endif } -/* fd, is a valid user file handle. +/* fd, is a valid user file handle. Translates the return of _swiread into bytes read. */ -int +int __attribute__((weak)) _read (int fd, char * ptr, int len) @@ -418,7 +418,7 @@ _swiwrite ( } /* fd, is a user file descriptor. */ -int +int __attribute__((weak)) _write (int fd, char * ptr, int len) @@ -587,7 +587,7 @@ _getpid (int n __attribute__ ((unused))) return 1; } -caddr_t +caddr_t __attribute__((weak)) _sbrk (int incr) { extern char end asm ("end"); /* Defined by the linker. */