public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Paul Brook <paul@codesourcery.com>
Cc: binutils@sourceware.org, Richard Earnshaw <rearnsha@arm.com>
Subject: Re: [patch] Arm BE8 mode and mapping sybols
Date: Mon, 15 May 2006 16:59:00 -0000	[thread overview]
Message-ID: <44684A49.8050800@redhat.com> (raw)
In-Reply-To: <200605091711.45182.paul@codesourcery.com>

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

      reply	other threads:[~2006-05-15  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-06  9:43 Paul Brook
2006-05-07 21:32 ` Nick Clifton
2006-05-08 18:20   ` Richard Earnshaw
2006-05-08 20:42     ` Nick Clifton
2006-05-09 19:06     ` Paul Brook
2006-05-15 16:59       ` Nick Clifton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44684A49.8050800@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=paul@codesourcery.com \
    --cc=rearnsha@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).