I did something like this some time ago. I am not sure about details but it
might be relevant to your problem.
create an assembly file and put your segment in order you want in it and
link it with the rest of your code. something like this:
    .area RETAIN
    .area DATA

.area space_a

    .area INITIALIZED
    .area HOME
    .area GSINIT
    .area NRT_INIT
    .area GSFINAL
    .area CONST
    .area INITIALIZER
    .area CODE

On Mon, Apr 27, 2020 at 12:10 AM Sergey Belyashov <
sergey.belyas...@gmail.com> wrote:

> Hi,
> C have not tool to control output section order. Strictly speaking, high
> level languages does not known anything about sections/segments. It is a
> linker job.
> So, you should prepare special data for each linker type.
>
> Best regards,
> Sergey Belyashov
>
> вс, 26 апр. 2020 г. в 22:02, Philipp Klaus Krause <p...@spth.de>:
>
>> Assuming I have a space_a segemnt that I want placed directly behind the
>> DATA segment, i sthere a way to do so from C code (i.e. without using
>> linker options or linker scripts)?
>>
>> Background: I want to have segments space_a and space_b in a regression
>> test for named address spaces. Both should be just after DATA.
>>
>> Philipp
>>
>>
>> _______________________________________________
>> Sdcc-user mailing list
>> Sdcc-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>>
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to