From 634e746544cc226ef388880bb1d3ec0144ff29db Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 29 Jan 1997 00:28:47 +0000 Subject: All RTEMS system call implementation renamed to be __rtems_*. --- c/src/lib/libbsp/a29k/portsw/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/a29k/portsw/startup/iface.c | 18 +++++----- .../lib/libbsp/hppa1.1/simhppa/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/i386/force386/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/i386/go32/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/i386/i386ex/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/i960/cvme961/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/m68k/efi332/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/m68k/idp/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c | 8 ++--- .../lib/libbsp/powerpc/papyrus/startup/bspstart.c | 8 ++--- c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds | 38 ++++++++++++++++++++++ c/src/lib/libbsp/unix/posix/startup/bspstart.c | 8 ++--- 21 files changed, 123 insertions(+), 85 deletions(-) (limited to 'c') diff --git a/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c b/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c index 1553203875..8325195162 100644 --- a/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c +++ b/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c @@ -85,7 +85,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -152,13 +152,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/a29k/portsw/startup/iface.c b/c/src/lib/libbsp/a29k/portsw/startup/iface.c index 06f49f60bf..90ab480037 100644 --- a/c/src/lib/libbsp/a29k/portsw/startup/iface.c +++ b/c/src/lib/libbsp/a29k/portsw/startup/iface.c @@ -19,7 +19,7 @@ read(int fd, char *buf, int nbytes) { - return __read(fd, buf, nbytes); + return __rtems_read(fd, buf, nbytes); } int @@ -27,7 +27,7 @@ write(int fd, char *buf, int nbytes) { - return __write(fd, buf, nbytes); + return __rtems_write(fd, buf, nbytes); } int @@ -35,13 +35,13 @@ open(char *buf, int flags, int mode) { - return __open(buf, flags, mode); + return __rtems_open(buf, flags, mode); } int close(int fd) { - return __close(fd); + return __rtems_close(fd); } /* @@ -51,7 +51,7 @@ close(int fd) int isatty(int fd) { - return __isatty(fd); + return __rtems_isatty(fd); } /* @@ -63,7 +63,7 @@ lseek(int fd, off_t offset, int whence) { - return __lseek(fd, offset, whence); + return __rtems_lseek(fd, offset, whence); } /* @@ -74,13 +74,13 @@ int fstat(int fd, struct stat *buf) { - return __fstat(fd, buf); + return __rtems_fstat(fd, buf); } int getpid() { - return __getpid(); + return __rtems_getpid(); } /* @@ -90,7 +90,7 @@ int kill(int pid, int sig) { - return __kill(pid, sig); + return __rtems_kill(pid, sig); } diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c b/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c index 76b73c7222..ec49abe2bf 100644 --- a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c +++ b/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c @@ -130,7 +130,7 @@ bsp_libc_init(void) /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -245,13 +245,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/i386/force386/startup/bspstart.c b/c/src/lib/libbsp/i386/force386/startup/bspstart.c index 04a9bae415..ab89bfdb69 100644 --- a/c/src/lib/libbsp/i386/force386/startup/bspstart.c +++ b/c/src/lib/libbsp/i386/force386/startup/bspstart.c @@ -60,7 +60,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -126,13 +126,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/i386/go32/startup/bspstart.c b/c/src/lib/libbsp/i386/go32/startup/bspstart.c index 9f20f4a4e5..c232c061a3 100644 --- a/c/src/lib/libbsp/i386/go32/startup/bspstart.c +++ b/c/src/lib/libbsp/i386/go32/startup/bspstart.c @@ -67,7 +67,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -133,13 +133,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c index 5542612dcf..9f549520b7 100644 --- a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c +++ b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c @@ -61,7 +61,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -127,13 +127,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c b/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c index 60fd38d969..649e05c330 100644 --- a/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c +++ b/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c @@ -62,7 +62,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -128,13 +128,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c index f004407312..80aff0f6b0 100644 --- a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c @@ -60,7 +60,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -126,13 +126,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c b/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c index f5eb9fbcbd..449ad5e19a 100644 --- a/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c @@ -60,7 +60,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -126,13 +126,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c b/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c index b3e33c16d0..48522be884 100644 --- a/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c @@ -66,7 +66,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -133,13 +133,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c index f8cb057317..1aa225d0c6 100644 --- a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c @@ -68,7 +68,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -134,13 +134,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c index d35ca4d5cf..3a07d2e8ea 100644 --- a/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c @@ -64,7 +64,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -130,13 +130,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c index 6fff075174..1e7299d385 100644 --- a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c @@ -69,7 +69,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -135,13 +135,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c index 950630e9ee..1e9f869cce 100644 --- a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c @@ -62,7 +62,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -128,13 +128,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c index ce0ed9b354..e42668426c 100644 --- a/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c @@ -65,7 +65,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -131,13 +131,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c index 755fc87e8b..63b4fa4c52 100644 --- a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c @@ -65,7 +65,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -131,13 +131,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c index 7cbfd6f83b..da8cc6d130 100644 --- a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c @@ -68,7 +68,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -134,13 +134,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c b/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c index e43bc7fb17..e542996d21 100644 --- a/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c +++ b/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c @@ -69,7 +69,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -135,13 +135,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c index e8faaa2904..6d870a22a6 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c @@ -86,7 +86,7 @@ void bsp_libc_init() /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -153,13 +153,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds b/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds index df1997639f..00bf4c6876 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds +++ b/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds @@ -21,6 +21,23 @@ MEMORY /* Do we need any of these for elf? __DYNAMIC = 0; */ + +/* What are these for? */ + +__EXCEPT_START__ = 0; +__EXCEPT_END__ = 0; +__SDATA2_START__ = 0; +__SDATA2_END__ = 0; +__SBSS2_START__ = 0; +__SBSS2_END__ = 0; +__FIXUP_START__ = 0; +__FIXUP_END__ = 0; +__GOT2_START__ = 0; +__GOT2_END__ = 0; +__SDATA_START__ = 0; +__SDATA_END__ = 0; + + SECTIONS { .vectors 0x0100 : @@ -37,6 +54,23 @@ SECTIONS *(.rodata1) *(.descriptors) *(rom_ver) + etext = ALIGN(0x10); + _etext = .; + __CTOR_LIST__ = .; + LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) + *(.ctors) + LONG(0) + __CTOR_END__ = .; + __DTOR_LIST__ = .; + LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) + *(.dtors) + LONG(0) + __DTOR_END__ = .; + *(.lit) + *(.shdata) + *(.init) + *(.fini) + _endtext = .; } > RAM /* R/W Data */ @@ -46,18 +80,22 @@ SECTIONS *(.data1) } > RAM + __GOT_START__ = .; .got : { s.got = .; *(.got.plt) *(.got) } > RAM + __GOT_END__ = .; + __SBSS_START__ = .; .bss : { bss.start = .; *(.bss) *(.sbss) *(COMMON) bss.end = ALIGN(4); } > RAM + __SBSS_END__ = .; bss.size = bss.end - bss.start; PROVIDE(_end = bss.end); diff --git a/c/src/lib/libbsp/unix/posix/startup/bspstart.c b/c/src/lib/libbsp/unix/posix/startup/bspstart.c index 6135c202fe..883d86a415 100644 --- a/c/src/lib/libbsp/unix/posix/startup/bspstart.c +++ b/c/src/lib/libbsp/unix/posix/startup/bspstart.c @@ -108,7 +108,7 @@ bsp_libc_init(void) /* * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) + * calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc) * Uses malloc() to get area for the iops, so must be after malloc init */ @@ -187,13 +187,13 @@ bsp_postdriver_hook(void) error_code = 'S' << 24 | 'T' << 16; - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) + if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) + if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) -- cgit v1.2.3