[PATCH 11/11] libdl: Add powerpc large memory and small data support.

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Feb 5 08:35:53 UTC 2019


On 05/02/2019 09:19, Chris Johns wrote:
> 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.

Good, but then please name it *_sdata_sbss_* and not just *_sdata_bss_*.

>
> 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.

I would start with the qoriq and the psim.

>
>> 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.

Yes, there is a bit of copy and paste involved, but if you tinker with 
linker symbols you should know what you are doing.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the devel mailing list