| Message ID | 20250227104811.178094-15-matthieu.longo@arm.com |
|---|---|
| State | Committed |
| Headers |
Return-Path: <binutils-bounces~patchwork=sourceware.org@sourceware.org>
X-Original-To: patchwork@sourceware.org
Delivered-To: patchwork@sourceware.org
Received: from server2.sourceware.org (localhost [IPv6:::1])
by sourceware.org (Postfix) with ESMTP id 696843858D37
for <patchwork@sourceware.org>; Thu, 27 Feb 2025 11:04:09 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 696843858D37
Authentication-Results: sourceware.org;
dkim=pass (1024-bit key,
unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256
header.s=selector1 header.b=Dbq6U0eR;
dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com
header.a=rsa-sha256 header.s=selector1 header.b=Dbq6U0eR
X-Original-To: binutils@sourceware.org
Delivered-To: binutils@sourceware.org
Received: from DUZPR83CU001.outbound.protection.outlook.com
(mail-northeuropeazlp170130004.outbound.protection.outlook.com
[IPv6:2a01:111:f403:c200::4])
by sourceware.org (Postfix) with ESMTPS id 94C0B3858C52
for <binutils@sourceware.org>; Thu, 27 Feb 2025 10:51:00 +0000 (GMT)
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 94C0B3858C52
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 94C0B3858C52
Authentication-Results: server2.sourceware.org;
arc=pass smtp.remote-ip=2a01:111:f403:c200::4
ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1740653465; cv=pass;
b=wINoYfjg4ubd3uQQRNSTND3Ui8OFIHeeQQ4obuUle6GXjcDeRvG6FBYFKO+VV+I29HxJwdIRFEuta+fxXdSGOWCh9XYEcV4k8dgG5xVW1ZlKjN1vwVmXJj+N9Ifye9ILYaOIbLK6AwnPU7Wnwe1ph3cHCkE9KBaC3iqJxU0jxi0=
ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key;
t=1740653465; c=relaxed/simple;
bh=Fx/QVCnJVubU9yVMCgoiP19Tf3EEesDOku4i28aJuvc=;
h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID:
MIME-Version;
b=DxDZXA15b9ymdqHctWGojrc61uxEv/WHs5RPYvPalhy8hQE3E1RN99wA22xedu8d9M+ZX0VCD5assUG9yvlqDbl9eFNupcn8k8/cQc3y1p9aLZ1nKAohq9tR/OvpGQqqOm0eFdADnQACKIANd1s8VK5TyBAPGXw06KjJUfeDBAk=
ARC-Authentication-Results: i=3; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94C0B3858C52
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=wnDk05VN6F+1SnFC7bWPlPnKoyA/NawQ8H0HvQAhWQdpV23D2T6OHrBN6FB59wqT+O4HsDMgk5N43wsdNWeGuIK80OWKiuBzQUNgkCcISQfDHY6vUgkGakx9ch8DwjbN/hIDtjszvaY2xvhBWtJrW4wbZqyoWWQT7l3yS7RVE5FAeSKMqySq5OYPdhHdYF82nF86S03ME6rMTWgkwQtjrosrAv2DmXn2SihrmUep5EK7eJwDjh1Lj55bF5eX6MoFHILmI5AIKLPNSEDsR4jqQ6J1/y4PJX3pmz04fs1U2Xm6+92GDhSMUA20qxuRaIhZ9v4c2DeEoqtX+KJ6Qlwp6g==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=M/ELgaPeVgQZHjeNpMqbLznlMCfE1+W/LpJcjjxago4=;
b=aIzGk9Yi3LFbddyjYJSGQA+3Ait7BJcbgvzhaBc6I3ZQq0XPzNce3Q++N56nrqWFMpSlRDNcbPdnu95lDUKtv4tPVahf/QfZCMAhLTuCXCRLa1UrlsAHy1kVjlSSsWXAjTRmpujBhVAzstxE7hxOUKI8yJS0252468BlcAk0+jV/w89lyOuXEqNxRzzOi03Z1UnlfVUf/XDeXYNJtpLNvl/vwRQphybOwZSfYyKYi/lNK4xdjBYcbF/H+clnfk+a3O/os6G9KVf/HzYlzgUN0j3NWIXrvqnHb4dEIaMQ5pEx4btpipZf1/dgZ9hII/JDt4cH/gQizfEaS2fqknal2w==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is
63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com;
dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com;
dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=0
ltdi=1)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=M/ELgaPeVgQZHjeNpMqbLznlMCfE1+W/LpJcjjxago4=;
b=Dbq6U0eRYirgB4AP9L0kjvsVm18eESYssaOPGUUc4cP+n024sHRSDi8RMqh6OsJ/88RvvALhH6yMvuHEP6STQ+TdShBm+uq9FqHgJWmnrc+Jwcv2SovuVeb6STaldSNKaTaM7tnO0YSIplXQ88nRMs0eRt1/pjl6tTnCPZPhztw=
Received: from DUZPR01CA0096.eurprd01.prod.exchangelabs.com
(2603:10a6:10:4bb::19) by DBBPR08MB6155.eurprd08.prod.outlook.com
(2603:10a6:10:1f5::15) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8489.18; Thu, 27 Feb
2025 10:50:56 +0000
Received: from DB5PEPF00014B93.eurprd02.prod.outlook.com
(2603:10a6:10:4bb:cafe::56) by DUZPR01CA0096.outlook.office365.com
(2603:10a6:10:4bb::19) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8489.21 via Frontend Transport; Thu,
27 Feb 2025 10:50:56 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
smtp.mailfrom=arm.com; dkim=pass (signature was verified)
header.d=arm.com;dmarc=pass action=none header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
63.35.35.123 as permitted sender) receiver=protection.outlook.com;
client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
pr=C
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
DB5PEPF00014B93.mail.protection.outlook.com (10.167.8.231) with
Microsoft
SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8489.16
via Frontend Transport; Thu, 27 Feb 2025 10:50:56 +0000
Received: ("Tessian outbound 0a056dca8bdd:v585");
Thu, 27 Feb 2025 10:50:56 +0000
X-CheckRecipientChecked: true
X-CR-MTA-CID: fbca7dd1e549a7e7
X-TessianGatewayMetadata:
V/4+RXLgyXHbWrbes7Nj6wn0U6YCrF1TUxvynt4h0cSLaZZrNe0pMjv0Mg4Gw6+Awp4A3HQ9vaEaKhf9sEJ+81yoaPhxsRJXi2yu64MPclhyqdxEULhLbmxDLaAwvLLRNtqPWGIQMCLSenwYFiOAfLRAmWDPWt6r06U2O/3Ie8w=
X-CR-MTA-TID: 64aa7808
Received: from Lf8935eccc999.2
by 64aa7808-outbound-1.mta.getcheckrecipient.com id
8C8F6932-CA66-46AC-A5C3-EAA47D04FE6C.1;
Thu, 27 Feb 2025 10:50:49 +0000
Received: from EUR02-DB5-obe.outbound.protection.outlook.com
by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id
Lf8935eccc999.2 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
Thu, 27 Feb 2025 10:50:49 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=FxO9/3SHDer68M+alRjLORpAUh/5t0tt6rABXTPZdwC/thuRbgfBzhCZ2F2Qr8zcvJeBDYGil5pvbjMzvVfPmKWfxKVw/i+xe9bTT5LlWSc71VVvnwiz5GXfx4Pas9lYbwbe0u5tXsoKCm194440f0RnYhEeLAPBpKTpu7G9Uyh9zjputkESaPPBJIBV5Gx+MbVYpSieETgfE6Q2ma/H3Ffa7XzFSUVxMcf7Z6JigfS/f8k/7ik7TKlLKefSRZ4ttGBWg4T0e77TXvpdY5IvBsDdZhEUKgY8ZOmxZDv1njaCjVxHedE9XVlndmJXXtAaTmg3LTdgkZq/0XxGyoYKeA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=M/ELgaPeVgQZHjeNpMqbLznlMCfE1+W/LpJcjjxago4=;
b=Jh8PdnBWw6ozIw27xZAGklKT1eZVpIu+udJ7zu9oHz/UOdv2ZEpdqLA6c5cucUdVAaJMT+M/nV69U5jpDXlDzgrn7h7jSWR3yY5YFRwpDoCl+yxdZayoHObGqHRX2/ZaOEyUO+usJTgkUqDcAqDlESNz+h9o/1BMLDQcB64ABCxsdZ9YtRUPamm5MnTzwA0f+ICIKjnxfWsuEz9P3OWW8AobEg/ja480J5zwhZM7aESVCbEbjTWKdCDvQNrAEfms4JGJimaHoTU+8M7HpSOrv/FA3+F+l3UJ2dHSFlr1RskCbf8w7tE6Cf+s0wk+lQPl1zWlm2OT7Vr4BL5EE8NPMA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is
172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com;
dmarc=fail (p=none sp=none pct=100) action=none header.from=arm.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=M/ELgaPeVgQZHjeNpMqbLznlMCfE1+W/LpJcjjxago4=;
b=Dbq6U0eRYirgB4AP9L0kjvsVm18eESYssaOPGUUc4cP+n024sHRSDi8RMqh6OsJ/88RvvALhH6yMvuHEP6STQ+TdShBm+uq9FqHgJWmnrc+Jwcv2SovuVeb6STaldSNKaTaM7tnO0YSIplXQ88nRMs0eRt1/pjl6tTnCPZPhztw=
Received: from PA7P264CA0062.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2de::17)
by DU0PR08MB9299.eurprd08.prod.outlook.com (2603:10a6:10:41e::10)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8489.19; Thu, 27 Feb
2025 10:50:46 +0000
Received: from AM4PEPF00025F96.EURPRD83.prod.outlook.com
(2603:10a6:102:2de:cafe::e1) by PA7P264CA0062.outlook.office365.com
(2603:10a6:102:2de::17) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8489.19 via Frontend Transport; Thu,
27 Feb 2025 10:50:45 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 172.205.89.229)
smtp.mailfrom=arm.com; dkim=none (message not signed)
header.d=none;dmarc=fail action=none header.from=arm.com;
Received-SPF: Fail (protection.outlook.com: domain of arm.com does not
designate 172.205.89.229 as permitted sender)
receiver=protection.outlook.com; client-ip=172.205.89.229;
helo=nebula.arm.com;
Received: from nebula.arm.com (172.205.89.229) by
AM4PEPF00025F96.mail.protection.outlook.com (10.167.16.5) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8511.0 via Frontend Transport; Thu, 27 Feb 2025 10:50:45 +0000
Received: from AZ-NEU-EX05.Arm.com (10.240.25.133) by AZ-NEU-EX05.Arm.com
(10.240.25.133) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 27 Feb
2025 10:50:45 +0000
Received: from PW070M4K.arm.com (10.1.29.163) by mail.arm.com (10.240.25.133)
with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport;
Thu, 27 Feb 2025 10:50:44 +0000
From: Matthieu Longo <matthieu.longo@arm.com>
To: <binutils@sourceware.org>
CC: Richard Earnshaw <richard.earnshaw@arm.com>, Nick Clifton
<nickc@redhat.com>, Alan Modra <amodra@gmail.com>, Matthieu Longo
<matthieu.longo@arm.com>
Subject: [PATCH v1 14/14] refactoring elf_find_and_remove_property
Date: Thu, 27 Feb 2025 10:47:39 +0000
Message-ID: <20250227104811.178094-15-matthieu.longo@arm.com>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <20250227104811.178094-1-matthieu.longo@arm.com>
References: <20250227104811.178094-1-matthieu.longo@arm.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-EOPAttributedMessage: 1
X-MS-TrafficTypeDiagnostic:
AM4PEPF00025F96:EE_|DU0PR08MB9299:EE_|DB5PEPF00014B93:EE_|DBBPR08MB6155:EE_
X-MS-Office365-Filtering-Correlation-Id: 7d91be74-63ff-4151-c059-08dd571c9d31
X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr
x-checkrecipientrouted: true
NoDisclaimer: true
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;
ARA:13230040|82310400026|376014|36860700013|1800799024;
X-Microsoft-Antispam-Message-Info-Original:
oQFH3hEw1Ri0kTCRcZt07WfsF3HbJWcby7yRDUUSyo7OB8oNy1vJWWefCHOVy+7nRj0Q7aTskPpmgx6fx31LYUEjTiMVkpeXNeyeWq+FcKlUOtirDd91/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dS5LkO62DyVhXs73pzLv7VMLinfDK5smR681SYtDLbCgMsnJPSTZCyrmrOFuKEpdNJ+0lold+8/0pZJj+Wbcvp3fH+ATOAAMb3lKBzzHDxRQSp6EC2Bfb5gvgmUi2he4NICZMsQHOeiWuHHLfChF1XktGXc9GQpBn0hApp/lI+G/9BhUlaqvuXsRziAlURyThYKZhRYdY1lF/HmaIqd6PzEkNlPa/j3i9rfZLoyBhSKv0XQcxRVVK8FqiZSAZQMButKV3yWQaCvmHWlO0iQ/GNKycRZjs6MCNrzGibVGjzbUz6cFMLoSoxwhJrA3G30=
X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent;
CAT:NONE; SFS:(13230040)(82310400026)(376014)(36860700013)(1800799024);
DIR:OUT; SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9299
X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:102:2de::17];
domain=PA7P264CA0062.FRAP264.PROD.OUTLOOK.COM
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DB5PEPF00014B93.eurprd02.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
b62e1da9-15a6-4e69-beaa-08dd571c96d9
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|36860700013|82310400026|1800799024|14060799003|35042699022;
X-Microsoft-Antispam-Message-Info:
mPLwiNCQc9lqUaQQeKzmyesUsti+mGNQyhHxHN8M9SFT6jT4HGsVcEbzXm7NFv81bZSacUidNa5r3tWgbVgYTExhiT/f5mR2nM3F0t7goiWDixuuw13zwuLXF/E7U+2OEcRgT9pqc+4gO3LKoMmxFLeJZmaLijzqBYB0M9OBxprafIbcLRbdvrOhswVeM9kh6mTlUx7038sXELJA8rEsLT/ZZ4NUflhKwA0F2f5C4UkW4lZxJewO4db3CDvVcSxsCud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nOYzcYyLWOEFAjDqjifSVymo8ti2Vc5wC0aIAKQK5EsWQ4/gcqEbQbK6lNuiV9oJiCjr+WzzpW7Odj9OSEDinKTrwp561b1qwTMKXU21HY1dOKk0f4UET73W2x8hU8B92MXuxjFpjNQzH5C1maZ05RJHU4VcnL+ikIvM24qE/5A+tvE=
X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:;
IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com;
PTR:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE;
SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024)(14060799003)(35042699022);
DIR:OUT; SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2025 10:50:56.4150 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
7d91be74-63ff-4151-c059-08dd571c9d31
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123];
Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
DB5PEPF00014B93.eurprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6155
X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0,
RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP,
UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: binutils@sourceware.org
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: Binutils mailing list <binutils.sourceware.org>
List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>,
<mailto:binutils-request@sourceware.org?subject=unsubscribe>
List-Archive: <https://sourceware.org/pipermail/binutils/>
List-Post: <mailto:binutils@sourceware.org>
List-Help: <mailto:binutils-request@sourceware.org?subject=help>
List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>,
<mailto:binutils-request@sourceware.org?subject=subscribe>
Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org
|
| Series |
Several clean-ups and refactorings before a long patch series on AArch64 build attributes
|
|
Checks
| Context | Check | Description |
|---|---|---|
| linaro-tcwg-bot/tcwg_binutils_build--master-arm | fail | Patch failed to apply |
| linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | fail | Patch failed to apply |
Commit Message
Matthieu Longo
Feb. 27, 2025, 10:47 a.m. UTC
This refactoring focuses primarily on code readability and reuse. - Use the already defined _bfd_elf_find_property instead of another raw for-loop. - Extract _bfd_elf_remove_property out of the function body. --- bfd/elf-properties.c | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-)
diff --git a/bfd/elf-properties.c b/bfd/elf-properties.c index 0dea9d53c45..07ab38098e6 100644 --- a/bfd/elf-properties.c +++ b/bfd/elf-properties.c @@ -70,6 +70,27 @@ _bfd_elf_insert_property (elf_property_list *l, return l; } +/* Remove a property from the list after prev. */ +static elf_property_list * +_bfd_elf_remove_property (elf_property_list *l, + elf_property_list *what, + elf_property_list *prev) +{ + if (l == NULL) + return l; + + if (prev == NULL) // Pop front + { + BFD_ASSERT (what == l); + l = what->next; + } + else + prev->next = what->next; + + what->next = NULL; + return l; +} + /* Get a property, allocate a new one if needed. */ elf_property * @@ -395,23 +416,16 @@ static elf_property * elf_find_and_remove_property (elf_property_list **listp, unsigned int type, bool rm) { - elf_property_list *list; + elf_property_list *prev; + elf_property_list *p = _bfd_elf_find_property (*listp, type, &prev); + if (p == NULL) + return NULL; - for (list = *listp; list; list = list->next) - { - if (type == list->property.pr_type) - { - /* Remove this property. */ - if (rm) - *listp = list->next; - return &list->property; - } - else if (type < list->property.pr_type) - break; - listp = &list->next; - } + if (rm) + *listp = _bfd_elf_remove_property (*listp, p, prev); - return NULL; + /* FIXME: we leak memory with this approach. */ + return &p->property; } /* Merge GNU property list *LISTP in ABFD with FIRST_PBFD. */