From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7891) id BC2373858D39; Tue, 28 Mar 2023 01:56:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC2373858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679968618; bh=Go8jvA646ToXCwXJPDSqMc+p/x36/PsDbZuv5htXuoU=; h=From:To:Subject:Date:From; b=gEuCxuKRpFq41pXAPTxOIIi/LodJC3g/TfAXuftBBNi59aJJmsdkBEq4Ye/XsGMbT Ch10jWW+t5bmYfM9sBtotgkIU8gKqfMPdjA/OPSodOPUahEKX3Qb6RgCdIRrXzg+Me oActhAuamVNE+TPFew6NLSNIYlTeNRpHD9VoQ+vM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Yinyu Cai To: glibc-cvs@sourceware.org Subject: [glibc] LoongArch: ldconfig: Add comments for using EF_LARCH_OBJABI_V1 X-Act-Checkin: glibc X-Git-Author: caiyinyu X-Git-Refname: refs/heads/master X-Git-Oldrev: bb557fff2ec20e0926932684f69835f90626bb06 X-Git-Newrev: 07dd75589ecbedec5162a5645d57f8bd093a45db Message-Id: <20230328015658.BC2373858D39@sourceware.org> Date: Tue, 28 Mar 2023 01:56:58 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=07dd75589ecbedec5162a5645d57f8bd093a45db commit 07dd75589ecbedec5162a5645d57f8bd093a45db Author: caiyinyu Date: Tue Mar 28 09:19:53 2023 +0800 LoongArch: ldconfig: Add comments for using EF_LARCH_OBJABI_V1 We added Adhemerval Zanella's comment to explain the reason for using EF_LARCH_OBJABI_V1. Diff: --- sysdeps/unix/sysv/linux/loongarch/readelflib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/unix/sysv/linux/loongarch/readelflib.c b/sysdeps/unix/sysv/linux/loongarch/readelflib.c index ceba355959..e34612895d 100644 --- a/sysdeps/unix/sysv/linux/loongarch/readelflib.c +++ b/sysdeps/unix/sysv/linux/loongarch/readelflib.c @@ -40,6 +40,12 @@ process_elf_file (const char *file_name, const char *lib, int *flag, ret = process_elf64_file (file_name, lib, flag, isa_level, soname, file_contents, file_length); + + /* The EF_LARCH_OBJABI_V1 flag indicate which set of static relocations + the object might use and it only considered during static linking, + it does not reflect in runtime relocations. However some binutils + version might set it on dynamic shared object, so clear it to avoid + see the SO as unsupported. */ flags = elf64_header->e_flags & ~EF_LARCH_OBJABI_V1; /* LoongArch linkers encode the floating point ABI as part of the ELF headers. */