Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1788274ybg; Thu, 30 Jul 2020 02:42:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKIXYXz5KwfCLhVoeePh3F+tYGR6I1aBwwtTbqkej+fMZbKv079DDYETumQJcsO4rOqJ1z X-Received: by 2002:a17:906:1986:: with SMTP id g6mr1872763ejd.404.1596102147268; Thu, 30 Jul 2020 02:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596102147; cv=none; d=google.com; s=arc-20160816; b=X09fRFBEAVd+NmyuQfHf/EbhcUYDeb3WqlRhtAgQfOywE4nEe1iWv4BS8hWd1bVLH0 qQ8WeK6yarpuizXpRNwhjck+cNB1zRPNrrm5t3WOiSN8u+hG+ITYlHoHffiUjGn4Cgje FVwEJbqUceO6ClxrBJJ++yU1NZM1/NjJITHM5ojH6X0uIA4SEnimf232h1AYQQMNfP7R aFbpdoicgbsPS6xFHr2j1VjlL6cQIDSHaV7VOKrnahEpYrvKhD7x9QcI03WgzEaFgNFK dwsRpqZYMiA+vqSEybUSS3/aEHuzc859bDIGKzXH2hEnqgcm1ZR2CWjHr7NATDCu88jK RJoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Z/7Qd3wsnadFWk6UFhwP36lWCWF/fRdGUrRZnq1R5GQ=; b=zU4yrhERqL9nqOR0kzPh3i2ZDp14/mTbNm0spAG6xb+a+Uqk23W/t4UrSzlQ9kQM+S WVkDhNMAXk3EykGYUVhQ3MxSFmVzOhIoavk0jBzLHZtf/M8leNymFWHvDhgWr9CJBTWn eyOcZXY2CLh1GZcqBVBru5P2qyFZdHTPkmZ1oQuI3uLpPlXK0SgKxlQuwkLQwI6R6U9s xGp9d9l2+KzV7zsFfWM2+j9bANsttv+lNnOyM8vXCK9aQKfU2EegTziKJTRlcf9hMdA6 m0pGdClQGFWjHhdgqx4hoKJy4hv2hbnpKqyNicJkXL2YSvN9dRM586s8CyDLiOhP4uaW 81iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LEtQhL50; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c7si2959674edw.303.2020.07.30.02.42.04; Thu, 30 Jul 2020 02:42:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LEtQhL50; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726868AbgG3Jlz (ORCPT + 99 others); Thu, 30 Jul 2020 05:41:55 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:48127 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726615AbgG3Jlx (ORCPT ); Thu, 30 Jul 2020 05:41:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596102112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Z/7Qd3wsnadFWk6UFhwP36lWCWF/fRdGUrRZnq1R5GQ=; b=LEtQhL50h4uPfd5cyNK5/CmxDJqq4wVHQUhr5+yb7xrq4yRrbazOYEDHp+ySxXlsZrOEGG os447Gy4AFUYCwCYVxQNcJTVtlktPnQeGANnNP5O2dIPBFg/EeSH2J+pR2Ld8oTPSyDUw5 bGybbR1pamDWhvWYjj3/tA2ntRVGpCg= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-505-y7ltPvRfPgyOAiM0PrQE1Q-1; Thu, 30 Jul 2020 05:41:48 -0400 X-MC-Unique: y7ltPvRfPgyOAiM0PrQE1Q-1 Received: by mail-wr1-f71.google.com with SMTP id b13so4964130wrq.19 for ; Thu, 30 Jul 2020 02:41:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z/7Qd3wsnadFWk6UFhwP36lWCWF/fRdGUrRZnq1R5GQ=; b=AurbopTN3Y/Op3I4cBO/AIIHDuO3DKUgzl5aJA7Dvx+WTpuXeRZO1wLpuNErAl3iGm qg8XfYPlvFFeLnDCUo1mapZj/1rO6wL//euBgdpRfWBZmRqWHq6bsLqvH1gZ9R22DyzZ RoVD+EJuf52d9yzj2fnQF+7g1nYTMN4WNUoI0RUlGnCZJ4uf8n/mi7KTwwdFFZqxZGcL DNQxnWDR4JX7iNdwf/yhVYFVBC6XZplmyMFQONhrvT2jsFKXIyqX+VImnnjJDvL+8Fem cf5kKdGDAwWpWdmyF8dsQ3GKYmTw+aXkW6A/HxWDlSyarP9jLjRhzNEjPOmhv3L5ykDU 7jfw== X-Gm-Message-State: AOAM533vBfyyIvakI2sxrHQRNXDnupyvDGFd+tejw9+Cxzy1D+rliH3R nI1FsWxpdDlm/LN+rHD/UoTQ8o6dAjhXyf/jvoYV9d90JRzTUsbNPepd52c4thjA9bZgH0/Ms29 G1ej6BnbU+N3YyugF1AmfyCRb X-Received: by 2002:a1c:2985:: with SMTP id p127mr12183510wmp.166.1596102107293; Thu, 30 Jul 2020 02:41:47 -0700 (PDT) X-Received: by 2002:a1c:2985:: with SMTP id p127mr12183488wmp.166.1596102107035; Thu, 30 Jul 2020 02:41:47 -0700 (PDT) Received: from redfedo.redhat.com ([2a01:cb14:499:3d00:cd47:f651:9d80:157a]) by smtp.gmail.com with ESMTPSA id w2sm10984807wre.5.2020.07.30.02.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 02:41:46 -0700 (PDT) From: Julien Thierry To: linux-kernel@vger.kernel.org Cc: jpoimboe@redhat.com, peterz@infradead.org, mhelsley@vmware.com, mbenes@suse.cz, Julien Thierry Subject: [PATCH v3 0/4] Remove dependency of check subcmd upon orc Date: Thu, 30 Jul 2020 10:41:39 +0100 Message-Id: <20200730094143.27494-1-jthierry@redhat.com> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Matt Helsley's change[1] provided a base framework to opt-in/out objtool subcommands at compile time. This makes it easier for architectures to port objtool, one subcommand at a time. Orc generation relies on the check operation implementation. However, the way this is done causes the check implementation to depend on the implementation of orc generation functions to call if orc generation is requested. This means that in order to implement check subcmd, orc subcmd also need to be implemented. These patches aim at removing that dependency, having orc subcmd being built on top of the check subcmd. Changes since v2 [2]: - Rebased on recent tip/objtool/core [1] https://www.spinics.net/lists/kernel/msg3510844.html [2] https://lkml.org/lkml/2020/6/8/59 Cheers, Julien --> Julien Thierry (4): objtool: Move object file loading out of check objtool: Move orc outside of check objtool: orc: Skip setting orc_entry for non-text sections objtool: orc_gen: Move orc_entry out of instruction structure tools/objtool/builtin-check.c | 7 ++- tools/objtool/builtin-orc.c | 27 +++++++++++- tools/objtool/check.c | 47 ++++---------------- tools/objtool/check.h | 1 - tools/objtool/objtool.c | 30 +++++++++++++ tools/objtool/objtool.h | 5 ++- tools/objtool/orc_gen.c | 83 ++++++++++++++++++++--------------- tools/objtool/weak.c | 4 +- 8 files changed, 122 insertions(+), 82 deletions(-) -- 2.21.3