This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/192] String literals don't obey -fdata-sections
- From: "amodra at bigpond dot net dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Nov 2004 06:36:30 -0000
- Subject: [Bug middle-end/192] String literals don't obey -fdata-sections
- References: <20000502194601.192.greyham@research.canon.com.au>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From amodra at bigpond dot net dot au 2004-11-30 06:36 -------
This is true of other constants too. For example, on powerpc-linux, compiling
the testcase in pr9571:
gcc -O2 -m32 -fdata-sections -fno-merge-constants -S /src/tmp/pr9571.c
gives:
.file "pr9571.c"
.globl d
.section .sdata.d,"a",@progbits
.align 3
.type d, @object
.size d, 8
d:
.long 1074339512
.long 1374389535
.section .rodata
.align 3
.LC0:
.long 1074339512
.long 1374389535
.section ".text"
.align 2
.p2align 4,,15
.globl f
.type f, @function
f:
lis 9,.LC0@ha
lfd 1,.LC0@l(9)
blr
.size f,.-f
.ident "GCC: (GNU) 4.0.0 20041129 (experimental)"
.section .note.GNU-stack,"",@progbits
The duplication of the constant isn't ideal either.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=192