bd1976llvm added a comment.

In D68101#1766359 <>, @rjmccall wrote:

> I can't speak for the pragma authors, but I strongly doubt the pragma is 
> intended to force all affected globals to go into a single section unit, 
> since the division into section units is purely an object-file representation 
> issue.

I'm thinking of embedded platforms where there is no or only very primitive 
linkers. There is also the advantage of producing similar output to GCC. 
Creating multiple output sections is not without risk - for example, it means 
that symbols can be re-ordered (relative to their original order in source 
files) which could cause a change in behaviour.

Perhaps I am being too cautious - we have had bugs and reviews open for long 
enough for anyone interested to comment. The way forward now, I think, is to 
make a reasonable fix and see what breaks.

> Looks to me like `MCContext::getELFSection` should be including the entry 
> size and flags as part of the uniquing key.

Agreed. I will update the patch to do that.


cfe-commits mailing list

Reply via email to