<div dir="ltr">Yes, you are right, that's a big oversight, please ignore.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">H.J. Lu <<a href="mailto:hjl.tools@gmail.com">hjl.tools@gmail.com</a>> 于2024年11月2日周六 05:45写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Nov 1, 2024 at 5:07 PM Xin Wang <<a href="mailto:yw987194828@gmail.com" target="_blank">yw987194828@gmail.com</a>> wrote:<br>
><br>
> Signed-off-by: Xin Wang <<a href="mailto:yw987194828@gmail.com" target="_blank">yw987194828@gmail.com</a>><br>
><br>
> ---<br>
> bfd/elf64-x86-64.c | 12 +++---------<br>
> 1 file changed, 3 insertions(+), 9 deletions(-)<br>
><br>
> diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c<br>
> index 4330bbd1648..707bbf9b103 100644<br>
> --- a/bfd/elf64-x86-64.c<br>
> +++ b/bfd/elf64-x86-64.c<br>
> @@ -1590,7 +1590,7 @@ elf_x86_64_need_pic (struct bfd_link_info *info,<br>
> {<br>
> const char *v = "";<br>
> const char *und = "";<br>
> - const char *pic = "";<br>
> + const char *pic;<br>
> const char *object;<br>
><br>
> const char *name;<br>
> @@ -1613,7 +1613,6 @@ elf_x86_64_need_pic (struct bfd_link_info *info,<br>
> v = _("protected symbol ");<br>
> else<br>
> v = _("symbol ");<br>
> - pic = NULL;<br>
> break;<br>
> }<br>
><br>
> @@ -1621,16 +1620,12 @@ elf_x86_64_need_pic (struct bfd_link_info *info,<br>
> und = _("undefined ");<br>
> }<br>
> else<br>
> - {<br>
> name = bfd_elf_sym_name (input_bfd, symtab_hdr, isym, NULL);<br>
> - pic = NULL;<br>
> - }<br>
><br>
> if (bfd_link_dll (info))<br>
> {<br>
> object = _("a shared object");<br>
> - if (!pic)<br>
> - pic = _("; recompile with -fPIC");<br>
> + pic = _("; recompile with -fPIC");<br>
> }<br>
> else<br>
> {<br>
> @@ -1638,8 +1633,7 @@ elf_x86_64_need_pic (struct bfd_link_info *info,<br>
> object = _("a PIE object");<br>
> else<br>
> object = _("a PDE object");<br>
> - if (!pic)<br>
> - pic = _("; recompile with -fPIE");<br>
> + pic = _("; recompile with -fPIE");<br>
> }<br>
><br>
> /* xgettext:c-format */<br>
> --<br>
> 2.25.1<br>
><br>
<br>
I don't think this is correct. Please rebase to include this commit:<br>
<br>
<a href="https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=360f74a101937d1c26e5e0b341043bac6e2d299d" rel="noreferrer" target="_blank">https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=360f74a101937d1c26e5e0b341043bac6e2d299d</a><br>
<br>
to see why it is incorrect.<br>
<br>
-- <br>
H.J.<br>
</blockquote></div>