Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp666676lql; Mon, 11 Mar 2024 13:42:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUOXF/7xWac99hoGIRitWyQwho1l2uBxpooefZx8a/FrQ2U25o+r5bAYMDQwKqgQZszgxSh6HWKR7p5BZ9oFifPbQmF/FaiVNTw65lsTA== X-Google-Smtp-Source: AGHT+IGeFMjRmEv8VioPW+UOQ2SfyzRr2zlGySQUef6JywHDBACOA0OV2SdDLVMfZZo0wLL8MpGY X-Received: by 2002:a05:622a:cb:b0:42e:a059:671a with SMTP id p11-20020a05622a00cb00b0042ea059671amr799qtw.21.1710189726346; Mon, 11 Mar 2024 13:42:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710189726; cv=pass; d=google.com; s=arc-20160816; b=KEaZimsvP6d5lBIirSW3CNGMq1XCkBCDMVA93dx+rGGhA8QiOMBXFyh2h0Ofn/37zP QD7UfXdLtQ8drR8Sb69GBqaUK+TJyPAfIwzKH98eQh2kMMSSBiahAlLyUVLwMh93PrNi 8i5E6Q+81eT/6U4fddHbLl8PY3Ts1DyyCIwCxdAbyYfg/wrewtlkeDjNZn+m1joCkF/6 T9Lpe+FQamyXD1hZMrkt+CyngYn9uIsb2Fme0ht/iXa0pfEJYhOPS2ZNCxSEf23N6uHK deRpaezMjcdBXRpOIUXF8D3MSdXojxeRpqrNgz3zELmVTLlnDQa+f0ed0bagdUPeSYpg O0qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=Hysh3fJNhJmvp1Mvqbl3AfXFa72LgQZtPG4AlifhcO0=; fh=9f1V2uOv/F6819zvYLEMohW9SMP439KNcAhcuPompyo=; b=jdirhb4w82ionJHQjXOeqpv3dyWIjFnQkYqZu8KMB0LPPxPo44EaqS2twFDuuGsS8E YpnMKQEnVIjU86jIHR8BPVsULoRz/TSOAl/wvA+wK4fAnn+Vjr889BY5GRVPBuT8bmlC 6Rn+C0rvOKEub4xq02FyXtFEv1qvavTrd56lyMbIzQtWaLpfHp5nBI2XDxZOnKUXMQS1 ouSTZ2GoUVtyRkeUGv6LKFANd6+iQLxRA3d7uJ5x/0oOMmhy60+VX9LWeu3QsccrBKzb X6C/sRRh0h9rRNC+XeAycRo5sdKLOn//Sp2/b0gdBsczLronPkayrcexRdYVpQF7JRUL oCOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=met2E4kd; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-99527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f22-20020a05622a105600b0042ee52a68aesi6252689qte.84.2024.03.11.13.42.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 13:42:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=met2E4kd; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-99527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 08B3E1C20C6C for ; Mon, 11 Mar 2024 20:42:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DAF7B58AA8; Mon, 11 Mar 2024 20:40:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="met2E4kd" Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F03657861 for ; Mon, 11 Mar 2024 20:40:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710189654; cv=none; b=hDtBoxf7/VHd59Xrb3Ii85zBdbBzMK1aHTY3kZ4jdhC4rM1c6Ljg/7m00V0TCMZXInnIm8tIO+5H9GFoNxYZ+VtN6VW0+eiwaPKZf4wcCyiIeN0555UTHM+9fUHsVqA7jjh+LcyFr0NURQDPcQkeA10cvaY2eRyCqE49T0DFXpo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710189654; c=relaxed/simple; bh=l6+vGocoJjKBZ6LjvyKw3EB2dMWQhPWbCAUhatHdqDE=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k5T9qxUKLpg+9gjaVQaq4D8J5c50rdQgXM/lvGH2Sh4QVzrhDEPlLrb/62d1gfc0wTLRwQalDGJl/Lz/jq9JbSS4anWOIa21kCPoMHpX5TzMlldVaadp6q5NNxLVtB9TT1uAp5uYYA9YHiNdAzzLTqi6yrs6obaT5CJBIRCxOUE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=met2E4kd; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-33e8f906f3dso1887298f8f.3 for ; Mon, 11 Mar 2024 13:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710189651; x=1710794451; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Hysh3fJNhJmvp1Mvqbl3AfXFa72LgQZtPG4AlifhcO0=; b=met2E4kdu7Dtzsz0EKXTMl/JmsybqY7YxI3Tu85dHRsR0t41/YZoNVpdwZUEp1JLGZ o8gYjn0bafuG/2e6hTtgi+aWrXDRyInawILP6lshtqyTPzln8MsI8YlO5+d6hkC/jv6D y/ouxqsi0jEqFHPkoaaULOLh/IHm55cz3sOdkD3mnPMeBycVN5P7hJXri9aCGWxgtlfX Jo2Ryk2WUF/o3Zf5cD/x2hR/7O/teFepxp82oFfN3PEx/p6xQ2QHNKUQu7cpHEmsbROO ej+y5eY3ItEURlu/Krkj91OnTeRlQYhyXPfnr5X8Bff/d9CT6ebQw7Z0vbX2WU6TbYUg uShQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710189651; x=1710794451; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hysh3fJNhJmvp1Mvqbl3AfXFa72LgQZtPG4AlifhcO0=; b=remTTVgRssRUkJQcu632rN42/pTdfuYNf8mfcOLk6SwnfxIgCrzIfPt5alkXBd9f3q plSl8M/OL+DOnCpY1VP6eXKGmfe53Zzd8YuW4kRoundxbTPUgPGnXFov88wQ7GU3+DXe hF10iIvdgyDEfLNgv7bjMDlBYNU+QMbVv/BVnV+DTGJLEYk+ygT0g59zVdoPTyyw3M+S Fhi7cxvzFG/6baL9syMRzYyxIj3dZKaFwqnTFkYzYA23Vuwc+F5hz4vju5/NCSBdiD3B q+YfeN5iDJmaVB4+62ytZYskww/m0dmaFhQx8gueRlqyxgOluPSnbvwu87EgXQjQcITn HKnA== X-Forwarded-Encrypted: i=1; AJvYcCXnoocIj6yH2zBVtQUjlEetscb7g30b02UfCHtI+6MSZnYuda9ARw/pa+rkWCS/j1HclcbEetV203cK3R9NqK40yVA8HzNd/3s8ob7w X-Gm-Message-State: AOJu0YzF7IRMjjc31LI9Xcb4oOvlDsLR95LljtuxnA33tnKyjqPFuYNS XzlCuny3a39NAnnDuqZ22mFJ/JONdsCY0uTuk7pwH0lDA7lES8uhL9fN0Tj0WBs= X-Received: by 2002:a5d:5012:0:b0:33e:1560:71a8 with SMTP id e18-20020a5d5012000000b0033e156071a8mr5271323wrt.7.1710189650835; Mon, 11 Mar 2024 13:40:50 -0700 (PDT) Received: from rex.hwlab.vusec.net (lab-4.lab.cs.vu.nl. [192.33.36.4]) by smtp.gmail.com with ESMTPSA id t14-20020a05600c198e00b0041312c4865asm14929355wmq.2.2024.03.11.13.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 13:40:50 -0700 (PDT) From: Brian Johannesmeyer To: Josh Poimboeuf , linux-kernel@vger.kernel.org, Brian Johannesmeyer Subject: [PATCH 7/7] scripts/faddr2line: Check only two symbols when calculating symbol size Date: Mon, 11 Mar 2024 21:40:19 +0100 Message-Id: <20240311204019.1183634-8-bjohannesmeyer@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240311204019.1183634-1-bjohannesmeyer@gmail.com> References: <20240311204019.1183634-1-bjohannesmeyer@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Rather than looping through each symbol in a particular section to calculate a symbol's size, grep for the symbol and its immediate successor, and only use those two symbols. Signed-off-by: Brian Johannesmeyer --- scripts/faddr2line | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/faddr2line b/scripts/faddr2line index 1fa6beef9f97..70d5a4602a92 100755 --- a/scripts/faddr2line +++ b/scripts/faddr2line @@ -252,7 +252,7 @@ __faddr2line() { found=2 break fi - done < <(echo "${ELF_SYMS}" | sed 's/\[.*\]//' | ${AWK} -v sec=$sym_sec '$7 == sec' | sort --key=2) + done < <(echo "${ELF_SYMS}" | sed 's/\[.*\]//' | ${AWK} -v sec=$sym_sec '$7 == sec' | sort --key=2 | ${GREP} -A1 " ${sym_name}$") if [[ $found = 0 ]]; then warn "can't find symbol: sym_name: $sym_name sym_sec: $sym_sec sym_addr: $sym_addr sym_elf_size: $sym_elf_size" -- 2.34.1