public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: liu & zhensong <liuzhensong@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] LoongArch: gas: Fix shared builds
Date: Mon,  3 Jul 2023 01:04:00 +0000 (GMT)	[thread overview]
Message-ID: <20230703010400.E8B7F3858439@sourceware.org> (raw)

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

commit 4bf2114b634413e224c990593455168b873519d9
Author: WANG Xuerui <git@xen0n.name>
Date:   Sun Jul 2 18:14:22 2023 +0800

    LoongArch: gas: Fix shared builds
    
    Formerly an include of libbfd.h was added in commit 56576f4a722
    ("LoongArch: gas: Add support for linker relaxation."), in order to
    allow calling _bfd_read_unsigned_leb128 from gas, but doing so broke
    shared builds. Commit d2fddb6d783 fixed this reference but did not
    remove the now unnecessary inclusion of libbfd.h. The gas_assert macro
    expands into a conditional call to abort(), but "abort" is re-defined to
    _bfd_abort in libbfd.h, so the extra include breaks any gas_assert
    usage, and should be removed.
    
    gas/ChangeLog:
    
            * config/tc-loongarch.c: Don't include libbfd.h.
    
    Fixes: d2fddb6d783 ("LoongArch: Fix ld "undefined reference" error with --enable-shared")
    Signed-off-by: WANG Xuerui <git@xen0n.name>

Diff:
---
 gas/config/tc-loongarch.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c
index 439bde18b7d..2e8a259d147 100644
--- a/gas/config/tc-loongarch.c
+++ b/gas/config/tc-loongarch.c
@@ -31,7 +31,6 @@
 #include <string.h>
 #include <stdio.h>
 #include <assert.h>
-#include "libbfd.h"
 
 /* All information about an instruction during assemble.  */
 struct loongarch_cl_insn

                 reply	other threads:[~2023-07-03  1:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230703010400.E8B7F3858439@sourceware.org \
    --to=liuzhensong@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).