aarch64: Fix --no-apply-dynamic-relocs for RELR

Message ID 20240702163019.4193816-1-szabolcs.nagy@arm.com
State New
Headers
Series aarch64: Fix --no-apply-dynamic-relocs for RELR |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Szabolcs Nagy July 2, 2024, 4:30 p.m. UTC
  The option only makes sense for RELA relative relocs where the
addend is present, not for RELR relative relocs.

Fixes bug 31924.
---
 bfd/elfnn-aarch64.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Nick Clifton July 15, 2024, 9:07 a.m. UTC | #1
Hi Szabolcs,

> The option only makes sense for RELA relative relocs where the
> addend is present, not for RELR relative relocs.
> 
> Fixes bug 31924.
> ---
>   bfd/elfnn-aarch64.c | 2 --
>   1 file changed, 2 deletions(-)
> 

Approved - please apply.

Cheers
   Nick
  

Patch

diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 000564672df..94c9a01069b 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -5990,8 +5990,6 @@  elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
 	    {
 	      /* Don't emit a relative relocation that is packed, only
 		 apply the addend.  */
-	      if (globals->no_apply_dynamic_relocs)
-		return bfd_reloc_ok;
 	      return _bfd_final_link_relocate (howto, input_bfd, input_section,
 					       contents, rel->r_offset, value,
 					       signed_addend);