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]

[Patch,AVR]: ad PR13503: Rename expression modifiers/RELOCs "hhi8" for data.


nick clifton wrote:
> Hi Johann,
> 
> Thanks for your patience in getting this patch in to the binutils
> sources.  I have now reviewed the patch, found no problems with it, and
> checked it in to the repository.
> 
> Cheers
>   Nick

Hi Nick,

thanks for applying the patch.

There is a typo: The right alias for "hh8" modifier (byte #2) is "hlo8"
and not "hhi8".

This is a follow-up addendum to fix that misnomer.  It also renames
the involved RELOCs so that no confusion will arise in the future.

The feature itself is unchanged. "hhi8", i.e. the 3rd byte of an
expression, not needed because there are no 4-byte addresses.

Johann


bfd/
	PR 13503
	* reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenrate.
	* elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
	R_AVR_8_HLO8.
	(avr_reloc_map): Ditto.

gas/
	PR 13503
	* config/tc-avr.c (avr_cons_fix_new): Rename R_AVR_8_HHI8 to
	R_AVR_8_HLO8.
	(exp_mod_data) Ditto. And replace "hhi8" with "hlo8".
	(md_apply_fix): Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
	
include/
	PR 13503
	* elf/avr.h (RELOC_NUMBERS): Rename R_AVR_8_HHI8 to R_AVR_8_HLO8.

diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index a087115..1a62084 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -4097,8 +4097,8 @@ in .byte hi8(symbol)  */
   BFD_RELOC_AVR_8_HI,
 
 /* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
-in .byte hhi8(symbol)  */
-  BFD_RELOC_AVR_8_HHI,
+in .byte hlo8(symbol)  */
+  BFD_RELOC_AVR_8_HLO,
 
 /* Renesas RL78 Relocations.  */
   BFD_RELOC_RL78_NEG8,
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 582cdae..38e41df 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -545,8 +545,8 @@ static reloc_howto_type elf_avr_howto_table[] =
 	 0xffffff,		/* src_mask */
 	 0xffffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
-  /* hhi8-part to use in  .byte hhi8(sym).  */
-  HOWTO (R_AVR_8_HHI8,		/* type */
+  /* hlo8-part to use in  .byte hlo8(sym).  */
+  HOWTO (R_AVR_8_HLO8,		/* type */
 	 16,			/* rightshift */
 	 0,			/* size (0 = byte, 1 = short, 2 = long) */
 	 8,			/* bitsize */
@@ -554,7 +554,7 @@ static reloc_howto_type elf_avr_howto_table[] =
 	 0,			/* bitpos */
 	 complain_overflow_dont,/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_AVR_8_HHI8",	/* name */
+	 "R_AVR_8_HLO8",	/* name */
 	 FALSE,			/* partial_inplace */
 	 0xffffff,		/* src_mask */
 	 0xffffff,		/* dst_mask */
@@ -600,7 +600,7 @@ static const struct avr_reloc_map avr_reloc_map[] =
   { BFD_RELOC_8,                    R_AVR_8 },
   { BFD_RELOC_AVR_8_LO,             R_AVR_8_LO8 },
   { BFD_RELOC_AVR_8_HI,             R_AVR_8_HI8 },
-  { BFD_RELOC_AVR_8_HHI,            R_AVR_8_HHI8 }
+  { BFD_RELOC_AVR_8_HLO,            R_AVR_8_HLO8 }
 };
 
 /* Meant to be filled one day with the wrap around address for the
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 026b077..3d30ebd 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1869,7 +1869,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_AVR_6_ADIW",
   "BFD_RELOC_AVR_8_LO",
   "BFD_RELOC_AVR_8_HI",
-  "BFD_RELOC_AVR_8_HHI",
+  "BFD_RELOC_AVR_8_HLO",
   "BFD_RELOC_RL78_NEG8",
   "BFD_RELOC_RL78_NEG16",
   "BFD_RELOC_RL78_NEG24",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index e5dd8bc..cbd558f 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -4371,10 +4371,10 @@ ENUMDOC
   This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
   in .byte hi8(symbol)
 ENUM
-  BFD_RELOC_AVR_8_HHI
+  BFD_RELOC_AVR_8_HLO
 ENUMDOC
   This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
-  in .byte hhi8(symbol)
+  in .byte hlo8(symbol)
 
 ENUM
   BFD_RELOC_RL78_NEG8
diff --git a/gas/config/tc-avr.c b/gas/config/tc-avr.c
index b2f2de2..2a558cb 100644
--- a/gas/config/tc-avr.c
+++ b/gas/config/tc-avr.c
@@ -327,7 +327,7 @@ static struct exp_mod_s exp_mod[] =
   {"lo8",    BFD_RELOC_AVR_LO8_LDI,    BFD_RELOC_AVR_LO8_LDI_NEG,    1},
   {"pm_lo8", BFD_RELOC_AVR_LO8_LDI_PM, BFD_RELOC_AVR_LO8_LDI_PM_NEG, 0},
   {"hlo8",   BFD_RELOC_AVR_HH8_LDI,    BFD_RELOC_AVR_HH8_LDI_NEG,    0},
-  {"hhi8",   BFD_RELOC_AVR_MS8_LDI,    BFD_RELOC_AVR_MS8_LDI_NEG,    0},
+  {"hlo8",   BFD_RELOC_AVR_MS8_LDI,    BFD_RELOC_AVR_MS8_LDI_NEG,    0},
 };
 
 /* A union used to store indicies into the exp_mod[] array
@@ -1342,7 +1342,7 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg)
           *where = 0xff & (value >> 8);
           break;
 
-        case BFD_RELOC_AVR_8_HHI:
+        case BFD_RELOC_AVR_8_HLO:
           *where = 0xff & (value >> 16);
           break;
 
@@ -1501,14 +1501,14 @@ static const exp_mod_data_t exp_mod_data[] =
   { "pm", 2, BFD_RELOC_AVR_16_PM, "`pm' " },
   /* The following are used together with avr-gcc's __memx address space
      in order to initialize a 24-bit pointer variable with a 24-bit address.
-     For address in flash, hhi8 will contain the flash segment if the
-     symbol is located in flash. If the symbol is located in RAM; hhi8
+     For address in flash, hlo8 will contain the flash segment if the
+     symbol is located in flash. If the symbol is located in RAM; hlo8
      will contain 0x80 which matches avr-gcc's notion of how 24-bit RAM/flash
      addresses linearize address space.  */
   { "lo8",  1, BFD_RELOC_AVR_8_LO,  "`lo8' "  },
   { "hi8",  1, BFD_RELOC_AVR_8_HI,  "`hi8' "  },
-  { "hhi8", 1, BFD_RELOC_AVR_8_HHI, "`hhi8' " },
-  { "hh8",  1, BFD_RELOC_AVR_8_HHI, "`hh8' "  },
+  { "hlo8", 1, BFD_RELOC_AVR_8_HLO, "`hlo8' " },
+  { "hh8",  1, BFD_RELOC_AVR_8_HLO, "`hh8' "  },
   /* End of list.  */
   { NULL, 0, 0, NULL }
 };
@@ -1518,7 +1518,7 @@ static const exp_mod_data_t *pexp_mod_data = &exp_mod_data[0];
 
 /* Parse special CONS expression: pm (expression) or alternatively
    gs (expression).  These are used for addressing program memory.  Moreover,
-   define lo8 (expression), hi8 (expression) and hhi8 (expression).  */
+   define lo8 (expression), hi8 (expression) and hlo8 (expression).  */
 
 void
 avr_parse_cons_expression (expressionS *exp, int nbytes)
@@ -1592,7 +1592,7 @@ avr_cons_fix_new (fragS *frag,
     case BFD_RELOC_AVR_16_PM:
     case BFD_RELOC_AVR_8_LO:
     case BFD_RELOC_AVR_8_HI:
-    case BFD_RELOC_AVR_8_HHI:
+    case BFD_RELOC_AVR_8_HLO:
       if (nbytes == pexp_mod_data->nbytes)
         fix_new_exp (frag, where, nbytes, exp, FALSE, pexp_mod_data->reloc);
       else
diff --git a/include/elf/avr.h b/include/elf/avr.h
index 6e3b308..b45d902 100644
--- a/include/elf/avr.h
+++ b/include/elf/avr.h
@@ -80,7 +80,7 @@ START_RELOC_NUMBERS (elf_avr_reloc_type)
      RELOC_NUMBER (R_AVR_8, 		       26)
      RELOC_NUMBER (R_AVR_8_LO8,                27)
      RELOC_NUMBER (R_AVR_8_HI8,                28)
-     RELOC_NUMBER (R_AVR_8_HHI8,               29)
+     RELOC_NUMBER (R_AVR_8_HLO8,               29)
 END_RELOC_NUMBERS (R_AVR_max)
 
 #endif /* _ELF_AVR_H */

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