From 6a6580331df3e09516d50f37d4dd5fd57825c08a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 28 Jul 2022 08:20:25 +0200 Subject: 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(-) (limited to 'cpukit/include/rtems/score') 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 = { \ -- cgit v1.2.3