[binutils-gdb] aarch64: Fix --no-apply-dynamic-relocs for RELR

Szabolcs Nagy nsz@sourceware.org
Mon Jul 15 12:42:50 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d21176c014a4696e667b8567df90364939269170

commit d21176c014a4696e667b8567df90364939269170
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Fri Jun 28 17:51:24 2024 +0100

    aarch64: Fix --no-apply-dynamic-relocs for RELR
    
    The option only makes sense for RELA relative relocs where the
    addend is present, not for RELR relative relocs.
    
    Fixes bug 31924.

Diff:
---
 bfd/elfnn-aarch64.c | 2 --
 1 file changed, 2 deletions(-)

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);


More information about the Binutils-cvs mailing list