Re: [Sdcc-user] How to control segment placement from C?

2020-04-26 Thread Vahid Bashiri
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

Re: [Sdcc-user] How to control segment placement from C?

2020-04-26 Thread Sergey Belyashov
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 Kra

[Sdcc-user] How to control segment placement from C?

2020-04-26 Thread Philipp Klaus Krause
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 ju