From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7867) id E8B7F3858439; Mon, 3 Jul 2023 01:04:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8B7F3858439 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: liu & zhensong To: bfd-cvs@sourceware.org Subject: [binutils-gdb] LoongArch: gas: Fix shared builds X-Act-Checkin: binutils-gdb X-Git-Author: WANG Xuerui X-Git-Refname: refs/heads/master X-Git-Oldrev: 512a0bc4fe484ece34566c038687cbdf7a97c812 X-Git-Newrev: 4bf2114b634413e224c990593455168b873519d9 Message-Id: <20230703010400.E8B7F3858439@sourceware.org> Date: Mon, 3 Jul 2023 01:04:00 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2023 01:04:01 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D4bf2114b6344= 13e224c990593455168b873519d9 commit 4bf2114b634413e224c990593455168b873519d9 Author: WANG Xuerui Date: Sun Jul 2 18:14:22 2023 +0800 LoongArch: gas: Fix shared builds =20 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. =20 gas/ChangeLog: =20 * config/tc-loongarch.c: Don't include libbfd.h. =20 Fixes: d2fddb6d783 ("LoongArch: Fix ld "undefined reference" error with= --enable-shared") Signed-off-by: WANG Xuerui 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 #include #include -#include "libbfd.h" =20 /* All information about an instruction during assemble. */ struct loongarch_cl_insn