powerpc .lcomm oddity
Alan Modra
amodra@gmail.com
Fri Aug 16 12:32:00 GMT 2013
This patch makes the powerpc .lcomm use the same subsection as the
generic .lcomm. I'm not sure why, but read.c:bss_alloc uses
subsection 1, possibly as a hack to avoid a problem seen on powerpc
with the following.
.section .bss,"aw",@nobits
.word 0
.lcomm test,1,1
One of these days when I have a little bit of spare time, I might even
fix this properly.
* config/tc-ppc.c (ppc_elf_lcomm): Use subsection 1.
Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.203
diff -u -p -r1.203 tc-ppc.c
--- gas/config/tc-ppc.c 14 Aug 2013 20:52:55 -0000 1.203
+++ gas/config/tc-ppc.c 16 Aug 2013 12:03:56 -0000
@@ -2196,7 +2195,7 @@ ppc_elf_lcomm (int xxx ATTRIBUTE_UNUSED)
align2 = 0;
record_alignment (bss_section, align2);
- subseg_set (bss_section, 0);
+ subseg_set (bss_section, 1);
if (align2)
frag_align (align2, 0, 0);
if (S_GET_SEGMENT (symbolP) == bss_section)
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list