[Bug rtl-optimization/89490] [9 Regression] char array constant put in string merge section

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 26 07:56:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89490

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Bernd Edlinger from comment #5)
> Adding zero bytes after each string constant makes no sense IMHO,
> since the linker will merge the constants, and so aligning the
> constants with .zero does probably not work, but the should be
> benign, except for that the alignment of the string constants.

The linker string merging code is not working with the asm directives, it
doesn't really care what part of the string comes from .string or .ascii and
what part comes from .zero directives.  And, what do you find wrong on the
alignment?
The section name indicates 8 byte alignment and .align 3 directive (which is
like .balign 8 on this target) says the alignment of the strings is 8 byte, so
all the strings (including a single terminating '\0') must be padded to
multiples of 8 bytes by zeros.


More information about the Gcc-bugs mailing list