Skip to content
Snippets Groups Projects
Commit 63b33ceb authored by Nick Clifton's avatar Nick Clifton
Browse files

PR 10387

        * config/tc-arm.h (THUMB_IS_FUNC): Handle a NULL pointer.
        (ARM_IS_FUNC): Likewise.
parent b101f7a1
No related branches found
No related tags found
No related merge requests found
2009-07-14 Nick Clifton <nickc@redhat.com>
PR 10387
* config/tc-arm.h (THUMB_IS_FUNC): Handle a NULL pointer.
(ARM_IS_FUNC): Likewise.
2009-07-14 Daniel Gutson <dgutson@codesourcery.com> 2009-07-14 Daniel Gutson <dgutson@codesourcery.com>
* config/tc-arm.c (md_assemble): Added validation. * config/tc-arm.c (md_assemble): Added validation.
......
...@@ -128,24 +128,26 @@ bfd_boolean arm_is_eabi (void); ...@@ -128,24 +128,26 @@ bfd_boolean arm_is_eabi (void);
/* For ELF objects THUMB_IS_FUNC is inferred from /* For ELF objects THUMB_IS_FUNC is inferred from
ARM_IS_THUMB and the function type. */ ARM_IS_THUMB and the function type. */
#define THUMB_IS_FUNC(s) \ #define THUMB_IS_FUNC(s) \
((arm_is_eabi () \ ((s) != NULL \
&& (ARM_IS_THUMB (s)) \ && ((arm_is_eabi () \
&& (symbol_get_bfdsym (s)->flags & BSF_FUNCTION)) \ && (ARM_IS_THUMB (s)) \
|| (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC)) && (symbol_get_bfdsym (s)->flags & BSF_FUNCTION)) \
|| (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC)))
#define ARM_IS_FUNC(s) \
((arm_is_eabi () \ #define ARM_IS_FUNC(s) \
&& !(ARM_IS_THUMB (s)) \ (((s) != NULL \
/* && !(THUMB_FLAG_FUNC & ARM_GET_FLAG (s)) \ */ \ && arm_is_eabi () \
&& !(ARM_IS_THUMB (s)) \
/* && !(THUMB_FLAG_FUNC & ARM_GET_FLAG (s)) \ */ \
&& (symbol_get_bfdsym (s)->flags & BSF_FUNCTION))) && (symbol_get_bfdsym (s)->flags & BSF_FUNCTION)))
#else #else
#define THUMB_IS_FUNC(s) (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC) #define THUMB_IS_FUNC(s) ((s) && ARM_GET_FLAG (s) & THUMB_FLAG_FUNC)
#define ARM_IS_FUNC(s) (!THUMB_IS_FUNC (s) \ #define ARM_IS_FUNC(s) (!THUMB_IS_FUNC (s) \
&& (symbol_get_bfdsym (s)->flags & BSF_FUNCTION)) && (s) && (symbol_get_bfdsym (s)->flags & BSF_FUNCTION))
#endif #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_THUMB(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_THUMB) : ARM_RESET_FLAG (s, ARM_FLAG_THUMB))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment