-fsection-anchors broken on ARM

Iain Buclaw ibuclaw at ubuntu.com
Tue Apr 23 08:10:43 PDT 2013


In reference to this link:
http://forum.dlang.org/post/50476C77.20608@googlemail.com


I'm currently working on dealing with each of these issues in the 
following pull (with the intention to merge back upstream where 
required).
https://github.com/D-Programming-GDC/GDC/pull/62

In order:

1. ClassInfo

The initialiser emitted will have two symbols, one public symbol 
with the TypeInfo_Class members, and a second private generated 
symbol for the interfaces array.  I can't forsee any way this 
could break compatibility with any existing compilied gdc (or 
perhaps even dmd/ldc) binaries out there.


2. TypeInfoStruct

Likewise to the above.


3. ModuleInfo

We can get the correct type as is defined in object.di through 
Module::moduleinfo, this would mean that all generated moduleinfo 
symbols will be the same size (rather than be of a variable size) 
padded out with zeros at the end.  However, this requires a 
front-end patch to store it as there is an implementation 
conflict because of MODULEINFO_IS_STRUCT macro, the type is a 
StructDeclaration (Module::moduleinfo is a ClassDeclaration type).

Going one step further, the type itself could probably be put up 
for a clean up.  Removing the struct New/Old implementation 
(keeping the 'New' for getting data members) and perhaps replace 
it something like the following.

struct ModuleInfo
{
   uint flags;           // Module flags
   uint index;           // Index into moduleinfo array
   void*[14] reserved;   // Padding large enough to contain
                         // all optional data added depending on 
flags.
}

This however is not really required, but am just throughing it 
out there as a thought.


Any thoughts on this?  (Looking at you Johannes).

Regards
Iain


More information about the D.gnu mailing list