This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Arm BE8 mode and mapping sybols


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]