Set bfd_com_section on all common syms.
Alan Modra
amodra@bigpond.net.au
Wed Nov 16 01:49:00 GMT 2005
I missed some places that deal with common syms and need a segment
to be set.
* config/tc-ppc.c (ppc_pe_comm): Set bfd_com_section segment.
* config/tc-alpha.c (s_alpha_comm): Likewise. Also, remove
redundant check.
* read.c (s_lsym): Remove non-BFD assembler sym handling.
Index: gas/config/tc-alpha.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-alpha.c,v
retrieving revision 1.70
diff -u -p -r1.70 tc-alpha.c
--- gas/config/tc-alpha.c 20 Sep 2005 18:24:45 -0000 1.70
+++ gas/config/tc-alpha.c 16 Nov 2005 01:37:55 -0000
@@ -3331,10 +3331,10 @@ s_alpha_comm (int ignore ATTRIBUTE_UNUSE
subseg_set (new_seg, 0);
p = frag_more (temp);
new_seg->flags |= SEC_IS_COMMON;
- if (! S_IS_DEFINED (symbolP))
- S_SET_SEGMENT (symbolP, new_seg);
+ S_SET_SEGMENT (symbolP, new_seg);
#else
S_SET_VALUE (symbolP, (valueT) temp);
+ S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
#endif
S_SET_EXTERNAL (symbolP);
}
Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.107
diff -u -p -r1.107 tc-ppc.c
--- gas/config/tc-ppc.c 20 Sep 2005 18:24:47 -0000 1.107
+++ gas/config/tc-ppc.c 16 Nov 2005 01:38:01 -0000
@@ -4416,6 +4416,7 @@ ppc_pe_comm (lcomm)
{
S_SET_VALUE (symbolP, (valueT) temp);
S_SET_EXTERNAL (symbolP);
+ S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
}
demand_empty_rest_of_line ();
Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.113
diff -u -p -r1.113 read.c
--- gas/read.c 15 Nov 2005 22:58:38 -0000 1.113
+++ gas/read.c 16 Nov 2005 01:37:51 -0000
@@ -2235,15 +2235,7 @@ s_lsym (int ignore ATTRIBUTE_UNUSED)
*p = 0;
symbolP = symbol_find_or_make (name);
- /* FIXME-SOON I pulled a (&& symbolP->sy_other == 0 &&
- symbolP->sy_desc == 0) out of this test because coff doesn't have
- those fields, and I can't see when they'd ever be tripped. I
- don't think I understand why they were here so I may have
- introduced a bug. As recently as 1.37 didn't have this test
- anyway. xoxorich. */
-
- if (S_GET_SEGMENT (symbolP) == undefined_section
- && S_GET_VALUE (symbolP) == 0)
+ if (S_GET_SEGMENT (symbolP) == undefined_section)
{
/* The name might be an undefined .global symbol; be sure to
keep the "external" bit. */
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list