[PATCH] [ld][x86_64] remove unnecessary check
Xin Wang
yw987194828@gmail.com
Fri Nov 1 07:39:44 GMT 2024
Signed-off-by: Xin Wang <yw987194828@gmail.com>
---
bfd/elf64-x86-64.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 4330bbd1648..209b14a46d9 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1613,7 +1613,6 @@ elf_x86_64_need_pic (struct bfd_link_info *info,
v = _("protected symbol ");
else
v = _("symbol ");
- pic = NULL;
break;
}
@@ -1621,16 +1620,12 @@ elf_x86_64_need_pic (struct bfd_link_info *info,
und = _("undefined ");
}
else
- {
name = bfd_elf_sym_name (input_bfd, symtab_hdr, isym, NULL);
- pic = NULL;
- }
if (bfd_link_dll (info))
{
object = _("a shared object");
- if (!pic)
- pic = _("; recompile with -fPIC");
+ pic = _("; recompile with -fPIC");
}
else
{
@@ -1638,8 +1633,7 @@ elf_x86_64_need_pic (struct bfd_link_info *info,
object = _("a PIE object");
else
object = _("a PDE object");
- if (!pic)
- pic = _("; recompile with -fPIE");
+ pic = _("; recompile with -fPIE");
}
/* xgettext:c-format */
--
2.25.1
More information about the Binutils
mailing list