Re: Placing variable/array in a particular section

2015-04-05 Thread Jens Bauer via Digitalmars-d-learn
On Sunday, 5 April 2015 at 10:16:10 UTC, Johannes Pfau wrote: I'll push support for the section attribute in 1~2 hours. (waiting for the testsuite ;-) [1] https://github.com/D-Programming-GDC/GDC/blob/master/libphobos/libdruntime/gcc/attribute.d I've made a couple of tests and it all works a

Re: Placing variable/array in a particular section

2015-04-05 Thread Jens Bauer via Digitalmars-d-learn
On Sunday, 5 April 2015 at 10:16:10 UTC, Johannes Pfau wrote: > On 4/04/2015 3:08 a.m., Jens Bauer wrote: It's possible to use gcc.attribute with custom mini-runtimes. You need the gcc/attribute.d file but you can simply copy/paste it from druntime[1], there are no dependencies. After havi

Re: Placing variable/array in a particular section

2015-04-05 Thread Johannes Pfau via Digitalmars-d-learn
Am Sat, 04 Apr 2015 10:38:44 + schrieb "Jens Bauer" : > On Saturday, 4 April 2015 at 02:57:22 UTC, Rikki Cattermole wrote: > > On 4/04/2015 3:08 a.m., Jens Bauer wrote: > >>> src/start.d:7:10: error: module attribute is in file > >>> 'gcc/attribute.d' which cannot be read > >>> import gcc.a

Re: Placing variable/array in a particular section

2015-04-04 Thread Jens Bauer via Digitalmars-d-learn
On Saturday, 4 April 2015 at 02:57:22 UTC, Rikki Cattermole wrote: On 4/04/2015 3:08 a.m., Jens Bauer wrote: src/start.d:7:10: error: module attribute is in file 'gcc/attribute.d' which cannot be read import gcc.attribute; ^ Uhm, it seems that druntime is required for that; unfort

Re: Placing variable/array in a particular section

2015-04-03 Thread Rikki Cattermole via Digitalmars-d-learn
On 4/04/2015 3:08 a.m., Jens Bauer wrote: On Friday, 3 April 2015 at 13:58:21 UTC, Jens Bauer wrote: On Friday, 3 April 2015 at 13:37:50 UTC, Rikki Cattermole wrote: On 4/04/2015 2:12 a.m., Jens Bauer wrote: Is there a way of setting the target section for a variable or an array ? Supposedly

Re: Placing variable/array in a particular section

2015-04-03 Thread Jens Bauer via Digitalmars-d-learn
On Friday, 3 April 2015 at 13:58:21 UTC, Jens Bauer wrote: On Friday, 3 April 2015 at 13:37:50 UTC, Rikki Cattermole wrote: On 4/04/2015 2:12 a.m., Jens Bauer wrote: Is there a way of setting the target section for a variable or an array ? Supposedly gdc supports it. [0] http://wiki.dlang.or

Re: Placing variable/array in a particular section

2015-04-03 Thread Jens Bauer via Digitalmars-d-learn
On Friday, 3 April 2015 at 13:37:50 UTC, Rikki Cattermole wrote: On 4/04/2015 2:12 a.m., Jens Bauer wrote: Is there a way of setting the target section for a variable or an array ? Supposedly gdc supports it. [0] http://wiki.dlang.org/GDC/Using_GDC Extensions->Attributes [1] https://gcc.gnu.

Re: Placing variable/array in a particular section

2015-04-03 Thread Rikki Cattermole via Digitalmars-d-learn
On 4/04/2015 2:12 a.m., Jens Bauer wrote: Today I finally succeeded in building my first "Hello World" D program (after fixing the endian problem). Is there a way of setting the target section for a variable or an array ? Eg. the equivalent way of doing this using gcc is: __attribute__((sectio

Placing variable/array in a particular section

2015-04-03 Thread Jens Bauer via Digitalmars-d-learn
Today I finally succeeded in building my first "Hello World" D program (after fixing the endian problem). Is there a way of setting the target section for a variable or an array ? Eg. the equivalent way of doing this using gcc is: __attribute__((section(".isr_vector"))) VectorFunc g_pfnVecto