[dmd-internals] How to avoid 4-word padding for symbols?

Walter Bright walter at digitalmars.com
Mon Nov 8 15:14:38 PST 2010



Michel Fortin wrote:
> L
> I mean the alignment of the symbols in a specific segment. In this case I need symbols inside the __protocol segment of the __OBJC section to have a 4-byte alignment. I'd have expected the align parameter of mach_getsegment() to do that, but setting it to 2 doesn't do anything.
>   

The segment alignment is for the whole segment, not for individual data 
items in it.

> Since all the symbols are 20 bytes I can just emit them with no alignment at all and I get the same result, that's what my small hack does.
>
> If you clone the Git repository you'll see it's the last commit (01c7708c82).
>
>   


More information about the dmd-internals mailing list