On Apr 5, 2012, at 2:30 AM, Richard Guenther wrote:
> Why can the link editor not promote the definitions alignment
> when merging with a common with bigger alignment?

The problem is that when a common symbol is upped in alignment, but then not 
chosen by ld (or worse, by the dynamic linker), but the codegen that assumes a 
larger alignment is used, then you realize the alignment of the data actually 
selected must be retroactively upped as well.  This means, the alignment in 
existing .a files, .o files, and .so files.  The .a and .o files can be easily 
solved by simply requiring the compile of the world after upgrading all linkers 
(static and dynamic) to only have -fdata-sections.  For .so files, well, that's 
above my pay grade.  Darwin, I'll note, can manage the upping on the size and 
alignment, but only between all the commons, not a hard definition behind it.

Reply via email to