aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2012-10-18 17:00:53 +0000
committerKai Tietz <kai.tietz@onevision.com>2012-10-18 17:00:53 +0000
commit2e5d8212305173a4078e6530ef769c8b9075e496 (patch)
tree5292d686f6eb9aa9a86b2a248a8fda4a4dff8bc2
parent5190f7153b17c02900d3a94b5fcfed867942961a (diff)
downloadbinutils-2e5d8212305173a4078e6530ef769c8b9075e496.tar.gz
* config/obj-coff.c: Add include of struc-symbol.h header.
(coff_frob_symbol): Check that function-aux entries are generated for defined symbols only.
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/obj-coff.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f8199cf81..b7e4f2ddc 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,9 @@
2012-10-18 Kai Tietz <ktietz@redhat.com>
+ * config/obj-coff.c: Add include of struc-symbol.h header.
+ (coff_frob_symbol): Check that function-aux entries are generated for
+ defined symbols only.
+
* doc/as.texinfo: Add missing documentation about section flag
exclude.
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index a15d3a2d6..dbe2f079e 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -26,6 +26,7 @@
#include "safe-ctype.h"
#include "obstack.h"
#include "subsegs.h"
+#include "struc-symbol.h"
#ifdef TE_PE
#include "coff/pe.h"
@@ -1359,7 +1360,8 @@ coff_frob_symbol (symbolS *symp, int *punt)
}
}
- if (coff_last_function == 0 && SF_GET_FUNCTION (symp))
+ if (coff_last_function == 0 && SF_GET_FUNCTION (symp)
+ && S_IS_DEFINED (symp))
{
union internal_auxent *auxp;
@@ -1371,7 +1373,8 @@ coff_frob_symbol (symbolS *symp, int *punt)
sizeof (auxp->x_sym.x_fcnary.x_ary.x_dimen));
}
- if (S_GET_STORAGE_CLASS (symp) == C_EFCN)
+ if (S_GET_STORAGE_CLASS (symp) == C_EFCN
+ && S_IS_DEFINED (symp))
{
if (coff_last_function == 0)
as_fatal (_("C_EFCN symbol for %s out of scope"),
@@ -1678,6 +1681,7 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED)
}
sec = subseg_new (name, (subsegT) exp);
+
if (alignment >= 0)
sec->alignment_power = alignment;