[Bug 139] GDC writes all-zero initialisers in the rodata section

2014-08-16 Thread via D.gnu
http://bugzilla.gdcproject.org/show_bug.cgi?id=139 --- Comment #5 from safety0ff --- Context of this report: it was filed because GDC was failing a dmd test (I can't remember which now.) -- You are receiving this mail because: You are watching all bug changes.

Re: Object file questions

2014-08-16 Thread Artur Skawina via D.gnu
On 08/16/14 20:40, Artur Skawina wrote: >> How can I use this with struct members ? > > One possibility would be to declare all members as `Volatile!...`, or I did not like that required dereference in the previous version, and tried a different approach: struct Timer { Volatile!uin

Re: Object file questions

2014-08-16 Thread Artur Skawina via D.gnu
On 08/16/14 18:46, Timo Sintonen via D.gnu wrote: > > I am not so familiar with these opAssign things, so how I can do basic > assignment: TimerB = 0x1234 ? > Is it possible to inline volatile_load and volatile_store ? version (GNU) { static import gcc.attribute; enum inline = gcc.att

Re: Object file questions

2014-08-16 Thread Timo Sintonen via D.gnu
On Saturday, 16 August 2014 at 09:59:03 UTC, Artur Skawina via D.gnu wrote: On 08/16/14 09:33, Johannes Pfau via D.gnu wrote: https://github.com/D-Programming-GDC/GDC/pull/82 [Only noticed this accidentally; using a mailing list instead of some web forum would increase visibility...] enum va

Re: Object file questions

2014-08-16 Thread Artur Skawina via D.gnu
On 08/16/14 12:41, Mike via D.gnu wrote: > On Saturday, 16 August 2014 at 09:59:03 UTC, Artur Skawina via D.gnu wrote: >> >> Taking the address of an always_inline function is allowed. >> > > It may be allowed, but it probably shouldn't be. Always-inlining a function > and taking the address of

Re: Object file questions

2014-08-16 Thread Mike via D.gnu
On Saturday, 16 August 2014 at 09:59:03 UTC, Artur Skawina via D.gnu wrote: Taking the address of an always_inline function is allowed. It may be allowed, but it probably shouldn't be. Always-inlining a function and taking the address of that function is contradictory. But this situation

Re: Object file questions

2014-08-16 Thread Mike via D.gnu
On Saturday, 16 August 2014 at 09:29:14 UTC, Johannes Pfau wrote: I just had a look at this and ClassInfo has a mutable 'monitor' field, so it can't be placed into read-only data. This was discussed at DConf 2014. https://www.youtube.com/watch?v=TNvUIWFy02I#t=1008 There is currently a pu

Re: Object file questions

2014-08-16 Thread Artur Skawina via D.gnu
On 08/16/14 09:33, Johannes Pfau via D.gnu wrote: > https://github.com/D-Programming-GDC/GDC/pull/82 [Only noticed this accidentally; using a mailing list instead of some web forum would increase visibility...] > enum var = Volatile!(T,addr)(): doesn't allow |= on enum literals, even if > the t

Re: Object file questions

2014-08-16 Thread Johannes Pfau via D.gnu
Am Sat, 16 Aug 2014 08:39:04 + schrieb "Timo Sintonen" : > > > Regarding __Class: Can you post a short example? > > Some lines from mapfile. Seems to be one for every type in the > program: > > .data 0x20001074 0x720 > minlibd/libdruntime/libdruntime.a(object_.o) >

Re: Object file questions

2014-08-16 Thread Timo Sintonen via D.gnu
On Saturday, 16 August 2014 at 07:36:07 UTC, Johannes Pfau wrote: Iain recently pushed a commit to put zero initializers into bss, so that's intentional: http://bugzilla.gdcproject.org/show_bug.cgi?id=139 But I understand your point that it should be in rodata instead, you'll have to discuss

[Bug 139] GDC writes all-zero initialisers in the rodata section

2014-08-16 Thread via D.gnu
http://bugzilla.gdcproject.org/show_bug.cgi?id=139 Johannes Pfau changed: What|Removed |Added Status|RESOLVED|NEW CC|

Re: Object file questions

2014-08-16 Thread Johannes Pfau via D.gnu
Am Sat, 16 Aug 2014 07:06:34 + schrieb "Timo Sintonen" : > On Thursday, 14 August 2014 at 19:05:46 UTC, Johannes Pfau wrote: > > Am Thu, 14 Aug 2014 17:53:32 + > > schrieb "Timo Sintonen" : > > > >> On Thursday, 14 August 2014 at 17:13:23 UTC, Johannes Pfau > >> wrote: > >> > Am Thu, 14 A

Re: Object file questions

2014-08-16 Thread ketmar via D.gnu
On Sat, 16 Aug 2014 07:06:34 + "Timo Sintonen via D.gnu" wrote: > structs wasting memory. Is there any way to omit them? maybe this will work: struct A { int n = void; uint[2] a = void; ...and so on for all fields } signature.asc Description: PGP signature

Re: Object file questions

2014-08-16 Thread Timo Sintonen via D.gnu
On Thursday, 14 August 2014 at 19:05:46 UTC, Johannes Pfau wrote: Am Thu, 14 Aug 2014 17:53:32 + schrieb "Timo Sintonen" : On Thursday, 14 August 2014 at 17:13:23 UTC, Johannes Pfau wrote: > Am Thu, 14 Aug 2014 10:07:04 + > schrieb "Timo Sintonen" : > >> I have been looking at object f