summaryrefslogtreecommitdiffstats
path: root/contrib/binutils
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2013-02-27 06:53:15 +0000
committerandrew <andrew@FreeBSD.org>2013-02-27 06:53:15 +0000
commit86e5cbf21f267d00b5b398c9c65f5c1137dbec35 (patch)
tree2498581a1e96092c6c02c9eb107bfcf9435769fb /contrib/binutils
parentce7d028db9f232c0df518a1f0a89c816791cdd1c (diff)
downloadFreeBSD-src-86e5cbf21f267d00b5b398c9c65f5c1137dbec35.zip
FreeBSD-src-86e5cbf21f267d00b5b398c9c65f5c1137dbec35.tar.gz
Clear the memory allocated to build the unwind tables. This fixes C++
exceptions on ARM EABI with static binaries.
Diffstat (limited to 'contrib/binutils')
-rw-r--r--contrib/binutils/gas/config/tc-arm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c
index 0b18b5b..daaae00 100644
--- a/contrib/binutils/gas/config/tc-arm.c
+++ b/contrib/binutils/gas/config/tc-arm.c
@@ -3079,6 +3079,7 @@ s_arm_unwind_fnend (int ignored ATTRIBUTE_UNUSED)
record_alignment (now_seg, 2);
ptr = frag_more (8);
+ memset(ptr, 0, 8);
where = frag_now_fix () - 8;
/* Self relative offset of the function start. */
@@ -17350,6 +17351,7 @@ create_unwind_entry (int have_data)
/* Allocate the table entry. */
ptr = frag_more ((size << 2) + 4);
+ memset(ptr, 0, (size << 2) + 4);
where = frag_now_fix () - ((size << 2) + 4);
switch (unwind.personality_index)
OpenPOWER on IntegriCloud