On May 23, 2013, at 9:17 AM, David Edelsohn <dje....@gmail.com> wrote: > I want to have a version of the patch committed. The only question now > is how much of the patch can be committed without exposing potential > incompatibilities between different object files.
The hard part is to know when for certain, the data will be used. As long as we know for certain the data will be used, we can up the alignment on the data (not the type). No link once, no comdat, no weak would be a start. The question in my mind, is it sufficient? Some linkers will maximize the alignments of all instances of data, some won't. I was thinking darwin would, but GNU ld would not. ! TREE_PUBLIC (decl) || (! DECL_WEAK (decl) && ! DECL_COMDAT (decl) && ! DECL_COMDAT_GROUP && DECL_COMMON (decl) …) now, I say that, but am aware of the predicate routines in varasm.c. decl_replaceable_p, decl_binds_to_current_def_p, binds_local_p, resolution_to_local_definition_p… certainly one of them should fit nicely, maybe.