[rtems commit] score: More robust linker sets

Chris Johns chrisj at rtems.org
Thu Oct 13 03:18:29 UTC 2016



On 13/10/2016 14:08, Chris Johns wrote:
> On 12/10/2016 20:13, Sebastian Huber wrote:
>> Module:    rtems
>> Branch:    master
>> Commit:    be573185e6d6ddafdd3612c7c2db04aa0f65a330
>> Changeset:
>> http://git.rtems.org/rtems/commit/?id=be573185e6d6ddafdd3612c7c2db04aa0f65a330
>>
>>
>> Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
>> Date:      Fri Sep 23 06:45:07 2016 +0200
>>
>> score: More robust linker sets
>>
>> Update #2408.
>> Update #2790.
>>
>>
>> -#define RTEMS_LINKER_SET_BEGIN( set ) \
>> +#define _LINKER_SET_BEGIN( set ) \
>>     _Linker_set_##set##_begin
>>
>> -#define RTEMS_LINKER_SET_END( set ) \
>> +#define _LINKER_SET_END( set ) \
>>     _Linker_set_##set##_end
>>
>
> This has broken libbsd here
> https://git.rtems.org/rtems-libbsd/tree/freebsd/contrib/pf/pfctl/pfctl.c#n2100
>

This patch OK?

$ git diff
diff --git a/freebsd/contrib/pf/pfctl/pfctl.c 
b/freebsd/contrib/pf/pfctl/pfctl.c
index 8dc289e..357dcb6 100644
--- a/freebsd/contrib/pf/pfctl/pfctl.c
+++ b/freebsd/contrib/pf/pfctl/pfctl.c
@@ -2097,9 +2097,11 @@ int
  rtems_bsd_command_pfctl(int argc, char *argv[])
  {
         int exit_code = EXIT_FAILURE;
-       const void *data_buf = RTEMS_LINKER_SET_BEGIN(bsd_prog_pfctl);
+       const void *data_buf;
         const size_t data_size = RTEMS_LINKER_SET_SIZE(bsd_prog_pfctl);

+  RTEMS_LINKER_SET_ASSIGN_BEGIN(bsd_prog_pfctl, data_buf);
+
         rtems_bsd_program_lock();
         exit_code = rtems_bsd_program_call_main_with_data_restore("pfctl",
             main, argc, argv, data_buf, data_size);

Chris



More information about the devel mailing list