[rtems commit] score: Allow linker garbage collection
Sebastian Huber
sebh at rtems.org
Thu Jul 28 06:50:23 UTC 2022
Module: rtems
Branch: master
Commit: 6a6580331df3e09516d50f37d4dd5fd57825c08a
Changeset: http://git.rtems.org/rtems/commit/?id=6a6580331df3e09516d50f37d4dd5fd57825c08a
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Jul 28 08:20:25 2022 +0200
score: Allow linker garbage collection
Place the object control blocks in dedicated sections to allow a linker garbage
collection.
Update #4678.
---
cpukit/include/rtems/score/objectdata.h | 2 +-
cpukit/include/rtems/score/thread.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpukit/include/rtems/score/objectdata.h b/cpukit/include/rtems/score/objectdata.h
index ba2cb9c5b2..4bdd30f2c6 100644
--- a/cpukit/include/rtems/score/objectdata.h
+++ b/cpukit/include/rtems/score/objectdata.h
@@ -449,7 +449,7 @@ Objects_Information name##_Information = { \
#define OBJECTS_INFORMATION_DEFINE( name, api, cls, type, max, nl, ex ) \
static Objects_Control * \
name##_Local_table[ _Objects_Maximum_per_allocation( max ) ]; \
-static RTEMS_SECTION( ".noinit.rtems.content.objects" ) \
+static RTEMS_SECTION( ".noinit.rtems.content.objects." #name ) \
type \
name##_Objects[ _Objects_Maximum_per_allocation( max ) ]; \
Objects_Information name##_Information = { \
diff --git a/cpukit/include/rtems/score/thread.h b/cpukit/include/rtems/score/thread.h
index 16430347af..40fefbc79a 100644
--- a/cpukit/include/rtems/score/thread.h
+++ b/cpukit/include/rtems/score/thread.h
@@ -1151,10 +1151,10 @@ Objects_Control *_Thread_Allocate_unlimited( Objects_Information *information );
#define THREAD_INFORMATION_DEFINE( name, api, cls, max ) \
static Objects_Control * \
name##_Local_table[ _Objects_Maximum_per_allocation( max ) ]; \
-static RTEMS_SECTION( ".noinit.rtems.content.objects" ) \
+static RTEMS_SECTION( ".noinit.rtems.content.objects." #name ) \
Thread_Configured_control \
name##_Objects[ _Objects_Maximum_per_allocation( max ) ]; \
-static RTEMS_SECTION( ".noinit.rtems.content.objects" ) \
+static RTEMS_SECTION( ".noinit.rtems.content.objects." #name ) \
Thread_queue_Configured_heads \
name##_Heads[ _Objects_Maximum_per_allocation( max ) ]; \
Thread_Information name##_Information = { \
More information about the vc
mailing list