Re: bfd/ELF: fold BFD_RELOC_<arch>_GOTOFF*

Jan Beulich <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
On 12.07.2026 14:24, Alan Modra wrote:
> Commit 705b90feb82c missed updating some frv and lm32 source files,
> resulting in build breakage if generated files in opcodes/ are
> regenerated.

Oh, wow. Isn't this really a layering violation? Yet then I see there are
ample other examples of BFD_* and bfd_* used from cpu/, so perhaps that's
indeed intentional.

> I'm pushing this one to the 2.47 branch too.

Thanks for fixing, Jan

> diff --git a/cpu/frv.opc b/cpu/frv.opc
> index 54acb9c902a..e534a93cb54 100644
> --- a/cpu/frv.opc
> +++ b/cpu/frv.opc
> @@ -1135,7 +1135,7 @@ parse_ulo16 (CGEN_CPU_DESC cd,
>  	{
>  	  *strp += 10;
>  	  errmsg = parse_symbolic_address (cd, strp, opindex,
> -					   BFD_RELOC_FRV_GOTOFFLO,
> +					   BFD_RELOC_LO16_GOTOFF,
>  					   & result_type, & value);
>  	  if (**strp != ')')
>  	    return "missing ')'";
> @@ -1261,7 +1261,7 @@ parse_uslo16 (CGEN_CPU_DESC cd,
>  	{
>  	  *strp += 10;
>  	  errmsg = parse_symbolic_address (cd, strp, opindex,
> -					   BFD_RELOC_FRV_GOTOFFLO,
> +					   BFD_RELOC_LO16_GOTOFF,
>  					   & result_type, & value);
>  	  if (**strp != ')')
>  	    return "missing ')'";
> @@ -1394,7 +1394,7 @@ parse_uhi16 (CGEN_CPU_DESC cd,
>  	{
>  	  *strp += 10;
>  	  errmsg = parse_symbolic_address (cd, strp, opindex,
> -					   BFD_RELOC_FRV_GOTOFFHI,
> +					   BFD_RELOC_HI16_GOTOFF,
>  					   & result_type, & value);
>  	  if (**strp != ')')
>  	    return "missing ')'";
> diff --git a/cpu/lm32.opc b/cpu/lm32.opc
> index 3a814c2e03c..fd0ae45f109 100644
> --- a/cpu/lm32.opc
> +++ b/cpu/lm32.opc
> @@ -189,7 +189,7 @@ parse_gotoff_hi16 (CGEN_CPU_DESC cd,
>        bfd_vma value;
>  
>        *strp += 11;
> -      errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LM32_GOTOFF_HI16,
> +      errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16_GOTOFF,
>                                     & result_type, & value);
>        if (**strp != ')')
>          return _("missing `)'");
> @@ -219,7 +219,7 @@ parse_gotoff_lo16 (CGEN_CPU_DESC cd,
>        bfd_vma value;
>  
>        *strp += 11;
> -      errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LM32_GOTOFF_LO16,
> +      errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16_GOTOFF,
>                                     &result_type, &value);
>        if (**strp != ')')
>          return _("missing `)'");
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.