[binutils-gdb] ix86: drop dead part of a conditional in elf_i386_convert_load_reloc()

Jan Beulich jbeulich@sourceware.org
Fri Feb 21 09:30:06 GMT 2025


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

commit 30b64be054a5a98b22437bfba69937513f612aab
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Feb 21 10:27:35 2025 +0100

    ix86: drop dead part of a conditional in elf_i386_convert_load_reloc()
    
    A few lines up we would have already bailed when "baseless && is_pic".

Diff:
---
 bfd/elf32-i386.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 77ae13527a8..b417cb0d67a 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1322,9 +1322,9 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
 	}
     }
 
-  /* Convert to R_386_32 if PIC is false or there is no base
-     register.  */
-  to_reloc_32 = !is_pic || baseless;
+  /* Convert to R_386_32 if PIC is false (if PIC is true we already know
+     there is a base register).  */
+  to_reloc_32 = !is_pic;
 
   eh = elf_x86_hash_entry (h);


More information about the Binutils-cvs mailing list