summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-10-26 19:44:34 +0000
committerPaul Brook <paul@codesourcery.com>2006-10-26 19:44:34 +0000
commit329b924edc89385756cd16ec7ba499d05a0d1527 (patch)
treebb19a06260ab3c4a1681f7cdad05418ce5ec3550
parent969674da0df6a8242d0261412de8fbfee77ae432 (diff)
downloadbinutils-redhat-329b924edc89385756cd16ec7ba499d05a0d1527.tar.gz
2006-10-26 Paul Brook <paul@codesourcery.com>
gas/ * config/tc-arm.c (arm_is_eabi): New function. * config/tc-arm.h (arm_is_eabi): New prototype. (THUMB_IS_FUNC): Use ELF function type for EABI objects. * doc/c-arm.texi (.thumb_func): Update documentation.
-rw-r--r--ChangeLog.csl8
-rw-r--r--gas/config/tc-arm.c6
-rw-r--r--gas/config/tc-arm.h13
-rw-r--r--gas/doc/c-arm.texi3
4 files changed, 30 insertions, 0 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 98e6ccf140..1d464111e5 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,5 +1,13 @@
2006-10-26 Paul Brook <paul@codesourcery.com>
+ gas/
+ * config/tc-arm.c (arm_is_eabi): New function.
+ * config/tc-arm.h (arm_is_eabi): New prototype.
+ (THUMB_IS_FUNC): Use ELF function type for EABI objects.
+ * doc/c-arm.texi (.thumb_func): Update documentation.
+
+2006-10-26 Paul Brook <paul@codesourcery.com>
+
binutils/
* objdump.c (disassemble_section): Set info->symtab_pos.
(disassemble_data): Set info->symtab and info->symtab_size.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 7ef1e7bb9e..1105590e77 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -238,6 +238,12 @@ static int meabi_flags = EABI_DEFAULT;
# else
static int meabi_flags = EF_ARM_EABI_UNKNOWN;
# endif
+
+bfd_boolean
+arm_is_eabi(void)
+{
+ return (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4);
+}
#endif
#ifdef OBJ_ELF
diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h
index f2615770c4..31d15bfc78 100644
--- a/gas/config/tc-arm.h
+++ b/gas/config/tc-arm.h
@@ -98,6 +98,7 @@ extern int arm_optimize_expr (expressionS *, operatorT, expressionS *);
#ifdef OBJ_ELF
#define md_end arm_md_end
extern void arm_md_end (void);
+bfd_boolean arm_is_eabi (void);
#endif
/* NOTE: The fake label creation in stabs.c:s_stab_generic() has
@@ -120,7 +121,19 @@ extern void arm_md_end (void);
#define ARM_IS_THUMB(s) (ARM_GET_FLAG (s) & ARM_FLAG_THUMB)
#define ARM_IS_INTERWORK(s) (ARM_GET_FLAG (s) & ARM_FLAG_INTERWORK)
+#ifdef OBJ_ELF
+
+/* For ELF objects THUMB_IS_FUNC is inferred from
+ ARM_IS_TUMB and the function type. */
+#define THUMB_IS_FUNC(s) \
+ ((arm_is_eabi () \
+ && (ARM_IS_THUMB (s)) \
+ && (symbol_get_bfdsym (s)->flags & BSF_FUNCTION)) \
+ || (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC))
+
+#else
#define THUMB_IS_FUNC(s) (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC)
+#endif
#define ARM_SET_THUMB(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_THUMB) : ARM_RESET_FLAG (s, ARM_FLAG_THUMB))
#define ARM_SET_INTERWORK(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_INTERWORK) : ARM_RESET_FLAG (s, ARM_FLAG_INTERWORK))
diff --git a/gas/doc/c-arm.texi b/gas/doc/c-arm.texi
index d9a65aa8eb..fd7417983b 100644
--- a/gas/doc/c-arm.texi
+++ b/gas/doc/c-arm.texi
@@ -458,6 +458,9 @@ between Arm and Thumb instructions and should be used even if
interworking is not going to be performed. The presence of this
directive also implies @code{.thumb}
+This directive is not neccessary when generating EABI objects. On these
+targets the encoding is implicit when generating Thumb code.
+
@cindex @code{thumb_set} directive, ARM
@item .thumb_set
This performs the equivalent of a @code{.set} directive in that it