[PATCH 11/11] libdl: Add powerpc large memory and small data support.
Chris Johns
chrisj at rtems.org
Tue Feb 5 08:19:47 UTC 2019
On 5/2/19 5:32 pm, Sebastian Huber wrote:
> On 05/02/2019 07:19, Sebastian Huber wrote:
>> On 05/02/2019 02:43, chrisj at rtems.org wrote:
>>> + /*
>>> + * Set bsp_section_sdata_bss_maximum_size to 1 to use the maximum, eg:
>>> + *
>>> + * bsp_section_sdata_bss_maximum_size = 1;
>>> + */
>>> + bsp_section_sdata_bss_default_size =
>>> + DEFINED(bsp_section_sdata_bss_maximum_size) ? 65536 : 0;
>>> + /*
>>> + * Set bsp_section_sdata_bss_size to the system's sdata and bss data
>>> size, eg:
>>> + *
>>> + * bsp_section_sdata_bss_maximum_size = 4096;
>>> + */
>>> + bsp_section_sdata_sbss_size = DEFINED(bsp_section_sdata_bss_size) ?
>>> + bsp_section_sdata_bss_size : bsp_section_sdata_bss_default_size;
>>
>> I would not make it more complicated than necessary. The systems using libdl
>> probably all have network support and file systems. For them wasting 64KiB
>> shouldn't be an issue. I would rename the bsp_section_sdata_bss_maximum_size
>> to something like bsp_section_use_maximum_sdata_size since it is actually not
>> a size.
The "small data" region is formally sdata and sbss sections which is why I used
the extended labeling. I wanted to make it clear this allocates space for sdata
_and_ sbss.
I agree there will be a hard split of BSPs, those that define the full size and
those who do not use libdl. The only issue is a small amount of data is needed
for some of the tests in the testsuite to pass. I expect a run of excluding
libdl tests. This is an unfortunate situation and I am not sure how else to
handle it.
I have not updated which BSPs get the full sdata size. I am not sure which need it.
> Maybe we can simply use:
>
> /*
> * Define bsp_section_sdata_fixed_size to set the size of the small-data area to
> a fixed size as specified, otherwise the size of the small-data area is defined
> by the section content.
> *
> * bsp_section_sdata_fixed_size = 65536;
> */
I provided the max value to avoid errors related to getting this value correct
in a number of places.
Chris
More information about the devel
mailing list