This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[AArch64] Call abort() consistently for un-handled stub.
- From: Marcus Shawcroft <marcus dot shawcroft at arm dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 04 Mar 2015 12:34:25 +0000
- Subject: [AArch64] Call abort() consistently for un-handled stub.
- Authentication-results: sourceware.org; auth=none
Hi,
Ensure we hard stop via abort() for unhandled stub types rather than
continuing either silently (or noisly with a BFD_FAIL()).
Committed.
Cheers
/Marcus
2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
* elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
(aarch64_size_one_stub): Likewise.
(aarch64_map_one_stub): Likewise.
From 48a71169560df452cdba789e112f4de5d5abd98c Mon Sep 17 00:00:00 2001
From: Marcus Shawcroft <marcus.shawcroft@arm.com>
Date: Mon, 2 Mar 2015 12:12:37 +0000
Subject: [PATCH] [AArch64] Call abort() instead of BFD_FAIL().
Call abort() giving a hard stop rather than BFD_FAIL () for unhandled
stub types.
---
bfd/ChangeLog | 6 ++++++
bfd/elfnn-aarch64.c | 11 ++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 57bc637..6c90c82 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-03 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
+ (aarch64_size_one_stub): Likewise.
+ (aarch64_map_one_stub): Likewise.
+
2015-02-28 Alan Modra <amodra@gmail.com>
* elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 8a66299..6397006 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -2445,8 +2445,7 @@ aarch64_build_one_stub (struct bfd_hash_entry *gen_entry,
template_size = sizeof (aarch64_erratum_835769_stub);
break;
default:
- BFD_FAIL ();
- return FALSE;
+ abort ();
}
for (i = 0; i < (template_size / sizeof template[0]); i++)
@@ -2504,7 +2503,7 @@ aarch64_build_one_stub (struct bfd_hash_entry *gen_entry,
break;
default:
- break;
+ abort ();
}
return TRUE;
@@ -2535,9 +2534,7 @@ aarch64_size_one_stub (struct bfd_hash_entry *gen_entry,
size = sizeof (aarch64_erratum_835769_stub);
break;
default:
- BFD_FAIL ();
- return FALSE;
- break;
+ abort ();
}
size = (size + 7) & ~7;
@@ -6552,7 +6549,7 @@ aarch64_map_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
return FALSE;
break;
default:
- BFD_FAIL ();
+ abort ();
}
return TRUE;
--
1.9.1