forked from Imagelibrary/rtems
splinkersets01: Test linker sets in library
Make sure that the linker sets work if placed in a library (this is how they are used in RTEMS).
This commit is contained in:
@@ -12,6 +12,8 @@ ldflags:
|
||||
- -Wl,--wrap=printf
|
||||
- -Wl,--wrap=puts
|
||||
links:
|
||||
- role: build-dependency
|
||||
uid: libsplinkersets01
|
||||
- role: build-dependency
|
||||
uid: sp01
|
||||
- role: build-dependency
|
||||
|
||||
19
spec/build/testsuites/sptests/libsplinkersets01.yml
Normal file
19
spec/build/testsuites/sptests/libsplinkersets01.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
build-type: library
|
||||
cflags: []
|
||||
copyrights:
|
||||
- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
|
||||
cppflags: []
|
||||
cxxflags: []
|
||||
enabled-by: true
|
||||
includes: []
|
||||
install: []
|
||||
install-path: null
|
||||
links: []
|
||||
source:
|
||||
- testsuites/sptests/splinkersets01/content.c
|
||||
- testsuites/sptests/splinkersets01/item-a.c
|
||||
- testsuites/sptests/splinkersets01/item-ca.c
|
||||
- testsuites/sptests/splinkersets01/sets.c
|
||||
target: splinkersets01
|
||||
type: build
|
||||
@@ -12,8 +12,6 @@ ldflags: []
|
||||
links: []
|
||||
source:
|
||||
- testsuites/sptests/splinkersets01/init.c
|
||||
- testsuites/sptests/splinkersets01/items.c
|
||||
- testsuites/sptests/splinkersets01/sets.c
|
||||
stlib: []
|
||||
target: testsuites/sptests/splinkersets01.exe
|
||||
type: build
|
||||
|
||||
@@ -1943,7 +1943,9 @@ endif
|
||||
if TEST_splinkersets01
|
||||
sp_libs += libsplinkersets01.a
|
||||
libsplinkersets01_a_SOURCES = splinkersets01/sets.c \
|
||||
splinkersets01/items.c
|
||||
splinkersets01/content.c \
|
||||
splinkersets01/item-a.c \
|
||||
splinkersets01/item-ca.c
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = $(sp_tests)
|
||||
|
||||
@@ -18,10 +18,6 @@
|
||||
|
||||
#include "splinkersets01.h"
|
||||
|
||||
RTEMS_LINKER_RWSET_ITEM_ORDERED(test_rw, const int *, a1, 1) = &a[1];
|
||||
|
||||
RTEMS_LINKER_ROSET_ITEM_ORDERED(test_ro, const int *, ca2, OC) = &ca[2];
|
||||
|
||||
int content_rw_1;
|
||||
char content_rw_2;
|
||||
char content_rw_3;
|
||||
21
testsuites/sptests/splinkersets01/item-a.c
Normal file
21
testsuites/sptests/splinkersets01/item-a.c
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Dornierstr. 4
|
||||
* 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 "splinkersets01.h"
|
||||
|
||||
RTEMS_LINKER_RWSET_ITEM_ORDERED(test_rw, const int *, a1, 1) = &a[1];
|
||||
21
testsuites/sptests/splinkersets01/item-ca.c
Normal file
21
testsuites/sptests/splinkersets01/item-ca.c
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Dornierstr. 4
|
||||
* 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 "splinkersets01.h"
|
||||
|
||||
RTEMS_LINKER_ROSET_ITEM_ORDERED(test_ro, const int *, ca2, OC) = &ca[2];
|
||||
Reference in New Issue
Block a user