summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-06-22 10:34:32 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-06-22 10:34:32 +0200
commit90b301c10ae0e46df64153ac3788238713aae3b1 (patch)
treeb85ce10a7955dd142fa882eeceac3b691ba7307a
parentMerge branch 'upstream' (diff)
parentbsps/powerpc: Add more BSP sections and sort them (diff)
downloadrtems-90b301c10ae0e46df64153ac3788238713aae3b1.tar.bz2
Merge branch 'upstream'
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base6
-rw-r--r--testsuites/fstests/Makefile.am1
-rw-r--r--testsuites/fstests/configure.ac1
-rw-r--r--testsuites/fstests/fsfseeko01/Makefile.am19
-rw-r--r--testsuites/fstests/fsfseeko01/fsfseeko01.doc11
-rw-r--r--testsuites/fstests/fsfseeko01/fsfseeko01.scn6
-rw-r--r--testsuites/fstests/fsfseeko01/init.c81
7 files changed, 123 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
index 5c6f5e6cd6..1768361100 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
@@ -85,6 +85,7 @@ SECTIONS {
.rodata : {
bsp_section_rodata_begin = .;
+ *(SORT(.bsp_rodata*))
*(.rodata .rodata.* .gnu.linkonce.r.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.rodata1 : {
@@ -250,7 +251,7 @@ SECTIONS {
.fast_data : {
bsp_section_fast_data_begin = .;
- *(.bsp_fast_data)
+ *(SORT(.bsp_fast_data*))
bsp_section_fast_data_end = .;
} > REGION_FAST_DATA AT > REGION_FAST_DATA_LOAD
bsp_section_fast_data_size = bsp_section_fast_data_end - bsp_section_fast_data_begin;
@@ -259,6 +260,7 @@ SECTIONS {
.data : {
bsp_section_data_begin = .;
+ *(SORT(.bsp_data*))
*(.data .data.* .gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
} > REGION_DATA AT > REGION_DATA_LOAD
@@ -330,7 +332,7 @@ SECTIONS {
.nocache : {
bsp_section_nocache_begin = .;
- *(.bsp_nocache)
+ *(SORT(.bsp_nocache*))
bsp_section_nocache_end = .;
} > REGION_NOCACHE AT > REGION_NOCACHE_LOAD
bsp_section_nocache_size = bsp_section_nocache_end - bsp_section_nocache_begin;
diff --git a/testsuites/fstests/Makefile.am b/testsuites/fstests/Makefile.am
index 79aef7527b..f8b4520fdd 100644
--- a/testsuites/fstests/Makefile.am
+++ b/testsuites/fstests/Makefile.am
@@ -1,6 +1,7 @@
ACLOCAL_AMFLAGS = -I ../aclocal
SUBDIRS =
+SUBDIRS += fsfseeko01
SUBDIRS += fsdosfssync01
SUBDIRS += imfs_fserror
SUBDIRS += imfs_fslink
diff --git a/testsuites/fstests/configure.ac b/testsuites/fstests/configure.ac
index 81967a911d..8de509fb67 100644
--- a/testsuites/fstests/configure.ac
+++ b/testsuites/fstests/configure.ac
@@ -77,6 +77,7 @@ AC_CHECK_SIZEOF([blkcnt_t])
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
+fsfseeko01/Makefile
fsdosfssync01/Makefile
imfs_fserror/Makefile
imfs_fslink/Makefile
diff --git a/testsuites/fstests/fsfseeko01/Makefile.am b/testsuites/fstests/fsfseeko01/Makefile.am
new file mode 100644
index 0000000000..058f550e12
--- /dev/null
+++ b/testsuites/fstests/fsfseeko01/Makefile.am
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = fsfseeko01
+fsfseeko01_SOURCES = init.c
+
+dist_rtems_tests_DATA = fsfseeko01.scn fsfseeko01.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(fsfseeko01_OBJECTS)
+LINK_LIBS = $(fsfseeko01_LDLIBS)
+
+fsfseeko01$(EXEEXT): $(fsfseeko01_OBJECTS) $(fsfseeko01_DEPENDENCIES)
+ @rm -f fsfseeko01$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/fstests/fsfseeko01/fsfseeko01.doc b/testsuites/fstests/fsfseeko01/fsfseeko01.doc
new file mode 100644
index 0000000000..da83087e7d
--- /dev/null
+++ b/testsuites/fstests/fsfseeko01/fsfseeko01.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: fsfseeko01
+
+directives:
+
+ TBD
+
+concepts:
+
+ - Ensure that fseeko() and ftello() can use huge positive off_t values.
diff --git a/testsuites/fstests/fsfseeko01/fsfseeko01.scn b/testsuites/fstests/fsfseeko01/fsfseeko01.scn
new file mode 100644
index 0000000000..523bd1aaaf
--- /dev/null
+++ b/testsuites/fstests/fsfseeko01/fsfseeko01.scn
@@ -0,0 +1,6 @@
+*** TEST FSFSEEKO 1 ***
+fopen: Success
+fseeko: Success
+ftello: Success
+fclose: Success
+*** END OF TEST FSFSEEKO 1 ***
diff --git a/testsuites/fstests/fsfseeko01/init.c b/testsuites/fstests/fsfseeko01/init.c
new file mode 100644
index 0000000000..b6de9a53d2
--- /dev/null
+++ b/testsuites/fstests/fsfseeko01/init.c
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <limits.h>
+
+static void test(void)
+{
+ FILE *file;
+ int rv;
+ const off_t off = sizeof(off_t) >= sizeof(int64_t)
+ ? INT64_MAX
+ : (sizeof(off_t) == sizeof(int32_t) ? INT32_MAX : 1);
+ off_t actual_off;
+
+ errno = 0;
+ file = fopen("file", "w+");
+ perror("fopen");
+ rtems_test_assert(file != NULL);
+
+ errno = 0;
+ rv = fseeko(file, off, SEEK_SET);
+ perror("fseeko");
+ rtems_test_assert(rv == 0);
+
+ errno = 0;
+ actual_off = ftello(file);
+ perror("ftello");
+ rtems_test_assert(actual_off == off);
+
+ errno = 0;
+ rv = fclose(file);
+ perror("fclose");
+ rtems_test_assert(rv == 0);
+}
+
+static void Init(rtems_task_argument arg)
+{
+ puts("\n\n*** TEST FSFSEEKO 1 ***");
+
+ test();
+
+ puts("*** END OF TEST FSFSEEKO 1 ***");
+
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>