From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B8F8D385C6FF for ; Mon, 2 Oct 2023 10:26:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B8F8D385C6FF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696242395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iwnelP2pD6wPc+aUhMz0jXRIX5w6JTnkO6hsYWY3t8Q=; b=AU7Nk38PyiN8wWFU+YbVkAKBdmvUprqEWNQcAfRlJAUcfUwMw4qDYBa5Z2bHEzqVTDkRmp LTjq7jMC2hCxDI9p88ZmrpRRXBDs8AzOCWLtBimVXGsKpQrx0j3Elz5aLkaEFf/+oNogRG AS4gYuwiwcIlCz55FHjl+5DA3XQj8ys= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-624-Qf_RkFoVPZq2PHVXrShTUg-1; Mon, 02 Oct 2023 06:26:24 -0400 X-MC-Unique: Qf_RkFoVPZq2PHVXrShTUg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 03A743C0EAD5; Mon, 2 Oct 2023 10:26:24 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88F9F40C6EBF; Mon, 2 Oct 2023 10:26:23 +0000 (UTC) From: Florian Weimer To: "H.J. Lu" Cc: GNU C Library Subject: Re: [RFC] DT_X86_64_PLT* dependency References: Date: Mon, 02 Oct 2023 12:26:22 +0200 In-Reply-To: (H. J. Lu's message of "Fri, 29 Sep 2023 08:16:16 -0700") Message-ID: <875y3pe2wh.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * H. J. Lu: > When these tags are generated, the r_addend field of the R_X86_64_JUMP_SLOT > relocation stores the offset of the indirect branch instruction. However, glibc > versions which don't have this commit in glibc 2.36: > > commit f8587a61892cbafd98ce599131bf4f103466f084 > Author: H.J. Lu > Date: Fri May 20 19:21:48 2022 -0700 > > x86-64: Ignore r_addend for R_X86_64_GLOB_DAT/R_X86_64_JUMP_SLOT > > According to x86-64 psABI, r_addend should be ignored for R_X86_64_GLOB_DAT > and R_X86_64_JUMP_SLOT. Since linkers always set their r_addends to 0, we > can ignore their r_addends. > > Reviewed-by: Fangrui Song > > won't ignore the r_addend value in the R_X86_64_JUMP_SLOT relocation. Such > binaries will fail to run with these versions of glibc. I am working > on a linker patch > to add a glibc version dependency similar to GLIBC_ABI_DT_RELR for DT_RELR. > Although this commit has been backported to glibc 2.33/2.34/2.35 > release branches, > there may be 2.33/2.34/2.35 glibc binaries without the fix. Can we reuse the GLIBC_ABI_DT_RELR marker? > Should binaries with DT_X86_64_PLT tags depend on glibc 2.36 or 2.33? I don't understand this question. The binaries will run on any system that has the marker symbol. Or do you suggest to use an existing glibc symbol version? Thanks, Florian