[patch] Arm BE8 mode and mapping sybols

Nick Clifton nickc@redhat.com
Mon May 15 16:59:00 GMT 2006


Hi Paul,

> 2006-05-09  Paul Brook  <paul@codesourcery.com>
> 
> bfd/
> 	* cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename ...
> 	(bfd_is_arm_special_symbol_name): ... to this.  Add type argument.
> 	Check symbol name is of specified type.
> 	* elf32-arm.c (elf32_arm_is_target_special_symbol,
> 	arm_elf_find_function, elf32_arm_output_symbol_hook): Use
> 	bfd_is_arm_special_symbol_name.
> 	* bfd-in.h (BFD_ARM_SPECIAL_SYM_TYPE_MAP,
> 	BFD_ARM_SPECIAL_SYM_TYPE_TAG, BFD_ARM_SPECIAL_SYM_TYPE_OTHER,
> 	BFD_ARM_SPECIAL_SYM_TYPE_ANY): Define.
> 	(bfd_is_arm_mapping_symbol_name): Remove prototype.
> 	(bfd_is_arm_special_symbol_name): Add prototype.
> 	* bfd-in2.h: Regenerate.
> gas/
> 	* config/tc-arm.c (arm_adjust_symtab): Use
> 	bfd_is_arm_special_symbol_name.
> ld/testsuite/
> 	* ld-arm/arm-be8.d: New test.
> 	* ld-arm/arm-be8.s: New test.
> 	* ld-arm/arm-elf.exp: Add arm-be8.

Approved - please apply.

One small point:

> +#define BFD_ARM_SPECIAL_SYM_TYPE_MAP	1
> +#define BFD_ARM_SPECIAL_SYM_TYPE_TAG	2
> +#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER  4
> +#define BFD_ARM_SPECIAL_SYM_TYPE_ANY	7

Since these constants are flags in a bitfield, I personally think that 
it is clearer to use shifted values, rather than relying upon the 
knowledge of how decimal numbers are encoded in binary.  ie:

   #define BFD_ARM_SPECIAL_SYM_TYPE_MAP	  (1 << 0)
   #define BFD_ARM_SPECIAL_SYM_TYPE_TAG	  (1 << 1)
   #define BFD_ARM_SPECIAL_SYM_TYPE_OTHER  (1 << 2)
   #define BFD_ARM_SPECIAL_SYM_TYPE_ANY	  ~0

This is just a personal thing though, not a requirement.

Cheers
   Nick



More information about the Binutils mailing list