forked from Imagelibrary/rtems
All RTEMS system call implementation renamed to be __rtems_*.
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user