This is the mail archive of the
mailing list for the GCC project.
Re: [RFD] Extremely large alignment of read-only strings
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Thorsten Glaser <tg at mirbsd dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 28 Jul 2016 18:25:29 +0300 (MSK)
- Subject: Re: [RFD] Extremely large alignment of read-only strings
- Authentication-results: sourceware.org; auth=none
- References: <Pine.BSM.4.64L.email@example.com>
On Wed, 27 Jul 2016, Thorsten Glaser wrote:
First of all, I think option -malign-data=abi (new in GCC 5) addresses your
need: it can be used to reduce the default (excessive) alignment to just the
psABI-dictated value (you can play with this at https://gcc.godbolt.org even if
you can't install GCC-5 locally).
Note that like with other ABI-affecting options you need to consider
implications for linking with code you're not building yourself: if the other
code expects bigger alignment, you'll have a bug.
One comment to your email below.
> After some (well, lots) more debugging, I eventually
> discovered -fdump-translation-unit (which, in the version
> I was using, also worked for C, not just C++), which showed
> me that the alignment was 256 even (only later reduced to
> 32 as that’s the maximum alignment for i386).
Most likely the quoted figures from GCC dumps are in bits, not bytes.