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.129.124]) by sourceware.org (Postfix) with ESMTPS id CD8D03858D20 for ; Mon, 8 Apr 2024 09:07:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD8D03858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CD8D03858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712567273; cv=none; b=hksUtRWCjKvZe3yPrXLUMkADptseNL7G91kCooIP1b34J8m+mxyzElnXAg4DqIc33C+BdRJug9nAfVzT+N2UzzxdYqsYcYFGOUMW6MaGs/ofPcZZ23B5mhGsvpNnZeeC2UpRp9pWJR9FOjmmifYTnODiEvHYeahFBmOXCOZriLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712567273; c=relaxed/simple; bh=53VqKxCa87RauojqqltbTbnZp05DOgWAmL7JuptVuwU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VcyvhzB0ZLTHOoZJXgZ2/OhD44/Po6adErwnsZJPs1UXZgY36FaPxpFLSX/jDtkMGJVsZUdyEn1KmLx2SbmceI+jRA/7W81LML81e0uWkbQRAhEEnY+2gzQfmNwyOFkZkrM+grWkQwrKUUJLaGpqUaVJbrIVPRPYnyQK1rJImz4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712567271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=6cvr3+kqNomW+Q0dI5YzOgwrDteJvesk4kToDGbbQfw=; b=WNYQMNHqsq8fy0y0O8eZfJNTzAWRb1EA7kE2jgah5R88Nj+tljI3oS4pp534w2cCrKPUcP JnhQ8lP7lOT3F1y5539yCygQo4FWRO2o1Zj9AwD3MHZH4xGuyctpLJ5l3ChxOn7iajOS+q xb4g5367MFmZigp1kBHJJkhA/6g6BdQ= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-445-aClqXcvKO0KWOfwyqtw5Bg-1; Mon, 08 Apr 2024 05:07:50 -0400 X-MC-Unique: aClqXcvKO0KWOfwyqtw5Bg-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-78d5715b2c7so129588085a.1 for ; Mon, 08 Apr 2024 02:07:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712567269; x=1713172069; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6cvr3+kqNomW+Q0dI5YzOgwrDteJvesk4kToDGbbQfw=; b=q+YNTdPiLyfEMxxQsnTa21//cMA6ZkB+1B1vO1pYnG3uffjK2m5JAj3ryyOe8HRlMy dPzQKZJCqyVf8vRWaamdzsQ14ESA+mQQDVLSbhsCQ/OEf2UlVCFtoaz9LkRUA8AGkAZk nL8T0ykD4bG6w7XqadeDt3fVy2r3CeK1/EZdBewaAVbRo19C0pvOjomx6NdaI4Itk9Ii Zgi02Ardh0a/xXheWtXDaBc7+1ArBqY0+HvUb5USV6bbUukyKXSBIeiGx3pzQVBsGLMc 9HtwsifSkZwMfDYWNj2UFN+79MJuEfdZR6mlR+t8axaFIO3ZYksSpi8waNdUOCH9M2cD H1Jw== X-Gm-Message-State: AOJu0Yxlq01JaYX8zYC6mZvEERJ83b6nvdHrK88Ey1ucLcrWi+8iKv8e zxyUYppTETyVpnizqZb0rxn3JNqe1zg/l+S/2TpfMlBMeeHyxm1LFTPs8oB+HGPtu8FYzf8JZ6E SutQSohN5viGBDnzPNJJlqvOWhY8ZK7JXEfzzdMSpqDXj2hBn8UFYWCLLkvqmmOGj1/W72NAqsC psyaO18gL6xw5n5E0T2vtuiXeQ4JlCrNvEI+8RIQ== X-Received: by 2002:a05:620a:40c9:b0:78d:65b4:4481 with SMTP id g9-20020a05620a40c900b0078d65b44481mr2941845qko.36.1712567269096; Mon, 08 Apr 2024 02:07:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8hZZo62u8KUVGrmvANNOrEVGU2IiGT36cOsdMmZn38EiOmMM9qYhzRuB7OClbkgV0lNqN3Q== X-Received: by 2002:a05:620a:40c9:b0:78d:65b4:4481 with SMTP id g9-20020a05620a40c900b0078d65b44481mr2941821qko.36.1712567268686; Mon, 08 Apr 2024 02:07:48 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id c27-20020a05620a11bb00b0078d6574d609sm943602qkk.52.2024.04.08.02.07.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 02:07:48 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id A51085077C72; Mon, 8 Apr 2024 11:07:45 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH, applied] Bug 29160 - support fn symbol aliasing a var symbol Organization: Red Hat / France X-Operating-System: AlmaLinux 9.3 X-URL: http://www.redhat.com Date: Mon, 08 Apr 2024 11:07:45 +0200 Message-ID: <87a5m4w7by.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.7 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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, In binaries originating from OCaml on s390x or ppcle platforms, it can happen that a function symbol aliases a variable symbol. By default, the ABIXML reader doesn't expect that. It expects that all aliases of a symbol are symbols of the same kind as their target. This patch relaxes that constraint from the ABIXML reader. It teaches read_symbol_db_from_input how to resolve unresolved function (resp. variable) symbol aliases to variable (resp. function) symbols. * src/abg-reader.cc (typedef string_strings_map_type): Define new typedef. (resolve_symbol_aliases): Define new function. (build_elf_symbol_db): Add two new parameters to carry unresolved function and variable symbol aliases. When a symbol alias can't resolve to any of the symbols of its kind (function or variable) then stage the alias away in the set of unresolved aliases. That set is then going to be resolved later. (read_symbol_db_from_input): Add two new parameters to carry unresolved function and variable symbol aliases. Pass them down to build_elf_symbol_db. (reader::read_corpus): Adjust the invocation of read_symbol_db_from_input to get the sets of unresolved function & variable symbol aliases. Invoke the new resolve_symbol_aliases the unresolved function & variable aliases. * tests/data/test-diff-pkg/PR29610/guestfs-tools-1.51.6-2.el9.s390x-self-check-report.txt: New test reference output. * tests/data/test-diff-pkg/PR29610/guestfs-tools-1.51.6-2.el9.s390x.rpm: New binary test input. * tests/data/test-diff-pkg/PR29610/guestfs-tools-debuginfo-1.51.6-2.el9.s390x.rpm: Likewise. * tests/data/Makefile.am: Add this new test material to source distribution. * tests/test-diff-pkg.cc (in_out_specs): Add the new test input to this test harness. Signed-off-by: Dodji Seketeli Applied to the master branch. --- src/abg-reader.cc | 210 ++++++++++++++++-- tests/data/Makefile.am | 4 + ...s-1.51.6-2.el9.s390x-self-check-report.txt | 21 ++ .../guestfs-tools-1.51.6-2.el9.s390x.rpm | Bin 0 -> 3924825 bytes ...tfs-tools-debuginfo-1.51.6-2.el9.s390x.rpm | Bin 0 -> 1374181 bytes tests/test-diff-pkg.cc | 12 + 6 files changed, 226 insertions(+), 21 deletions(-) create mode 100644 tests/data/test-diff-pkg/PR29610/guestfs-tools-1.51.6-2.el9.s390x-self-check-report.txt create mode 100644 tests/data/test-diff-pkg/PR29610/guestfs-tools-1.51.6-2.el9.s390x.rpm create mode 100644 tests/data/test-diff-pkg/PR29610/guestfs-tools-debuginfo-1.51.6-2.el9.s390x.rpm The patch is too big to be attached here, even if gzipped. You can however read it and get it from Git at https://sourceware.org/git/?p=libabigail.git;a=commit;h=a82958b3f5b64732ef95836671d701c008c3072b. Cheers, -- Dodji