Changeset 840f21d in rtems
- Timestamp:
- 04/07/20 05:13:58 (4 years ago)
- Branches:
- 5, master
- Children:
- 19efa9a0
- Parents:
- 099ab00
- git-author:
- Sebastian Huber <sebastian.huber@…> (04/07/20 05:13:58)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (04/08/20 17:22:36)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/include/rtems/score/basedefs.h
r099ab00 r840f21d 359 359 #else 360 360 #define RTEMS_DEFINE_GLOBAL_SYMBOL( _name, _value ) 361 #endif362 363 /**364 * @brief Defines a global symbol with the specified name in the specified365 * section.366 *367 * The name must be a valid designator. The alignment of the symbol depends on368 * the current location counter of the section.369 */370 #if defined(__GNUC__)371 #define RTEMS_DEFINE_GLOBAL_SYMBOL_IN_SECTION( _name, _section ) \372 __asm__( \373 ".pushsection \"" _section "\"\n" \374 "\t.globl " \375 RTEMS_XSTRING( RTEMS_SYMBOL_NAME( _name ) ) "\n" \376 RTEMS_XSTRING( RTEMS_SYMBOL_NAME( _name ) ) ":\n" \377 "\t.popsection\n" \378 )379 #else380 #define RTEMS_DEFINE_GLOBAL_SYMBOL_IN_SECTION( _name, section )381 361 #endif 382 362 -
testsuites/sptests/spmisc01/init.c
r099ab00 r840f21d 99 99 100 100 RTEMS_DEFINE_GLOBAL_SYMBOL(a_global_symbol, 0xabc); 101 102 RTEMS_DECLARE_GLOBAL_SYMBOL(a_second_symbol);103 104 RTEMS_DEFINE_GLOBAL_SYMBOL_IN_SECTION(a_second_symbol, ".rtemsroset.dummy");105 101 106 102 RTEMS_STATIC_ASSERT(0 != 1, zero_neq_one); … … 216 212 rtems_test_assert(obfuscate_variable(63) == 63); 217 213 rtems_test_assert((uintptr_t)a_global_symbol == 0xabc); 218 p = a_second_symbol;219 RTEMS_OBFUSCATE_VARIABLE(p);220 rtems_test_assert((uintptr_t)p != 0);221 214 rtems_test_assert(RTEMS_ARRAY_SIZE(array) == 3); 222 215 rtems_test_assert(sizeof(zero_length_array_struct) == 4);
Note: See TracChangeset
for help on using the changeset viewer.