From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id E6F5B3858D33 for ; Tue, 31 May 2022 10:28:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E6F5B3858D33 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24V7m0Sx019288; Tue, 31 May 2022 10:28:04 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gbcahmraj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 May 2022 10:28:04 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 24VAFQh8003068; Tue, 31 May 2022 10:28:02 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2176.outbound.protection.outlook.com [104.47.58.176]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3gc8jwuusn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 May 2022 10:28:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LEhgTK6uY5EIKd/tVyjFvpnAA68SsTq9pgSiV6GO0e30yBemrXpDAx8domNsdEN4v89ZcX6HN/OKiUMBfy3apfmYr3IPpJeEz4Ud5oasM7F1lqom3+6148RAloqUznlL/liAQpsTUKhcYOqJp981GanTG5/4az5Fxd89YXdJnTite3zpZwy0it55qXfDs3+YWyTIwhHVXvr1kashDSK7eH55b0mSQBgQCeRy7guuBYWid0kbE1pZy0mLnofEIk4hYYRwOKNCUlB7HlkxGcCaLghg2leFwsjKSfbUaj9hSZcu6giSQJk7sJFhXe1VAmm/DhaqCITHS95KhPXh4ArQzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=NqAvJrqtH8+Nhih/74sOUTC+WIXt0VyhjQCdSFBmjbg=; b=eYER7hQI6NEzZeLjRfRyYUbGnv9iTOVxiEIBWozINDkhB7F/g6wIauEV4T1loGmZ67UBjG0BroB7fSUwoacBlucqMnPzIx06Ay1OHbX/A7eopJ4CIYCGQPcb6UBGJ0Zb0O9Tf9R9yt2wPkcFOx9uBcd1tmDf6QkQkJmMEYD0GSGe82K+W34bjjAFfVNObhvPuMhV5TixCa22zcOG25rootUGW+/G2C2HVVbyyVtkuIWIAfrdaBF+uYiGeojd74w3XfOd65uryZJZzu1TjFewZoM86+tSEBtSl2+C1IsETGCJjKFur0dXo1uOQUd61a4PC/KRNvcpC+lOdZE7MctjTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from BYAPR10MB2888.namprd10.prod.outlook.com (2603:10b6:a03:88::32) by BYAPR10MB3160.namprd10.prod.outlook.com (2603:10b6:a03:151::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Tue, 31 May 2022 10:28:00 +0000 Received: from BYAPR10MB2888.namprd10.prod.outlook.com ([fe80::287e:5ffc:d595:8316]) by BYAPR10MB2888.namprd10.prod.outlook.com ([fe80::287e:5ffc:d595:8316%6]) with mapi id 15.20.5293.019; Tue, 31 May 2022 10:28:00 +0000 From: "Jose E. Marchesi" To: Mark Wielaard Cc: "Guillermo E. Martinez" , elfutils-devel@sourceware.org, Nick Clifton Subject: Re: [PATCH] strip: keep .ctf section in stripped file References: <20220531022619.419179-1-guillermo.e.martinez@oracle.com> Date: Tue, 31 May 2022 12:26:50 +0200 In-Reply-To: (Mark Wielaard's message of "Tue, 31 May 2022 09:06:26 +0200") Message-ID: <87fskqov4l.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-ClientProxiedBy: LNXP265CA0016.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5e::28) To BYAPR10MB2888.namprd10.prod.outlook.com (2603:10b6:a03:88::32) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 67123235-dd1c-4172-340c-08da42f03c8f X-MS-TrafficTypeDiagnostic: BYAPR10MB3160:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G49ye2z9pEzGtTPGOfWwd6N2Fwhn0HRfYjHYiMXGQZwIzOcZX1JOZVseVOdvDiTel2rogP/aVAE8Xw0t0LOHQOH2G4MRvG+xpd+vY2C9x1JVOI6qYvYt+VGn0zW5hqEgRzY1KeG3Red2cne7Kh3cE783pAd+1k0CUsHMqtbmkhg5EAK6kDmz0PEcFQhTJSNmKwxsygH0lR7r6tSp0e3BQFmSylYrdwo6S354zIJ7WJqB2Alx80VbwGR5ZeQV0bhUTZn6FuzoPnui4Mat7ZlcNTbaxdAqbLPUPbc4UkdfD9n2/lAeznMN+tAYpC4sBbn31yLR7jKsloVU09xm+/n3opbsCiiooNzI+O6HnJLGuSr9pcNO12t4rwx0X0GN19mAjpPDR2KdbRYcyqCjBpaNTKc6ME6934wQkjDlTkGlOkBYkirqbcHLtLh1da6+Wmg13P2ZwOJwf0l5oZZd8FbAE5hdr/4/C4xGXtsYmMYxFW2+HVS0bp66/TL/N/ZAt02YXyRhMqjbylGyabFh7Jw96HwwfK7YTDfHKHVefPOmvKn7HTX79gI30pGRcCSLsHgQ3hCm26BzX/VF2lVxfJ5Nd59EQo8+eGmRw6HSWpbx2VuhcsohI6+416sPogzYUHVQI3F2i5l0IDGVREsqv4SkUVeIpCY2KW7X2nXR0s6JBQglE5foKI0FNudJX3DzwFi5xsuUiOP54hmf2SIreFiMn8uYgzaIRsE49VjGBuu6Ul016heAta0j74pXBv8ZfqlhYo2Zx1rW+D0aIB38BX+KEXSZlqw2wy4cXRKciQtUUNUUlnD+Y9fxRJnCMeQoGXtPFkKpjdMURdecds6NUQBAfQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR10MB2888.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(52116002)(4326008)(66946007)(38350700002)(54906003)(6506007)(2906002)(316002)(186003)(6916009)(8676002)(508600001)(38100700002)(6486002)(36756003)(83380400001)(86362001)(8936002)(6666004)(2616005)(6512007)(26005)(66476007)(66556008)(30864003)(5660300002)(142923001)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?cPYW9diBkJdMsllENhPg0/V3wMCVL3AHU57IvKA++hJ/x0bsNo8eB7TpDQ+B?= =?us-ascii?Q?zHYXMprRYZgKoBl3eI43Furi7+sgHORkffU6jzy4h72Rw45q+wPu1d+om4lo?= =?us-ascii?Q?WYwu4t44jGsczP+71TzEdCTYA9p9hw9EGNilmM4BVSJOmz9F+n3fqOJvEe22?= =?us-ascii?Q?MVM0lGhCnOfXfAO2+MnsuDya/Ph3C8auIvIDUc8wquAaXDeBbfU3rjXzAMUv?= =?us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PzCz98j5c8nu2E?= =?us-ascii?Q?mKhOfpVOkmbxH3YI8y92FyZmx2PdtHE8FfuiVET1jy9KvIiMefc5mTC0AxlV?= =?us-ascii?Q?p0sIW3vb/rIGXxHOLKi5u0rBRnv5n63QH0ZDYqY6DtaJrnSx3wL8Dn45j0aY?= =?us-ascii?Q?LV26azKy7kMQVeeGamCfbmRnELdYPjoKdYt7iZZfoMo0LP2N46tBgNFsDHHg?= =?us-ascii?Q?Gu3SQiXX409skNME2n5JfUATddLjkCP/NqBtAqA0yqRm0RzlKOgVlH9xqJFj?= =?us-ascii?Q?Cv/JhCmoGZMgqs47mrc19p2XDUulwAiZ0AEBtnfVY8y9ng3YDXyLA3SuqsH2?= =?us-ascii?Q?VdIrOi1foV1BuziR9B6K/WezRe32O7pQhUOkVYKEUAc2HgB/wjYNZ5xlFqKk?= =?us-ascii?Q?aO/OqqQJI21wItxirlRXFryb+SkAcDdtXT/NC2t1XLEhmoF/MHy40xBcTAX3?= =?us-ascii?Q?qDqdTAGrRm7LhJz8STE4xJ1mfePYA6uGSajrDa5lKu84JXM/sjZFxirvGCER?= =?us-ascii?Q?0+TxWKTRCASNNtudDSNX9+MSSNZQSnM20Fk0jf0QzNyATYLypBhn64uZMj68?= =?us-ascii?Q?IvX96UoKFWdYeBYbSX6Ul9rsyvdO5tQ9o32kNHj1v8HUA9oExeVLOd7lXNbN?= =?us-ascii?Q?LYN/2qNl1R1Ry5cmJRlqhjLIICXEkn8=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67123235-dd1c-4172-340c-08da42f03c8f X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB2888.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2022 10:28:00.5854 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: u4Iyl2fTsZIJTDQY4cGDfxNuiQa5NFZBk6tUpLV67jctqA6OgUftD1JzVkIAqtwRKqjQiyKkDUrIEep/zYfrzS0loHypp9jwVExPOe2PjTM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3160 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.874 definitions=2022-05-31_03:2022-05-30, 2022-05-31 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 mlxscore=0 suspectscore=0 spamscore=0 phishscore=0 malwarescore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205310054 X-Proofpoint-ORIG-GUID: NuwG6i8leZB0CqHArQWj9Ojr6WMrJlMU X-Proofpoint-GUID: NuwG6i8leZB0CqHArQWj9Ojr6WMrJlMU X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2022 10:28:27 -0000 [Added Nick in CC.] > Hi Guillermo, > > On Mon, May 30, 2022 at 09:26:19PM -0500, Guillermo E. Martinez via Elfutils-devel wrote: >> Hello elfutils team, >> >> This patch is meant to avoid remove the CTF section in >> stripped files. Please let me know your thoughts. >> >> CTF debug format was designed to be present in stripped files, so >> this section should not be removed, so a new --remove-ctf option >> is added to indicate explicitly that .ctf section will be stripped >> out from binary file. > > First, very nice patch. My only real concern with it is that it should > describe how the testfile-ctf.bz2 is generated. We don't want really > random test binaries in the testsuite. There should be at least some > method to regenerate them, even if we don't automate that. See > e.g. tests/run-readelf-n.sh which also uses binary test files, but has > a little description on how each of them was generated. > > I am CCing Nick Clifton who works on binutils and annobin to check how > binutils strip handles this. And because we were recently discussing > putting some annobin data in a special section and how to indicate > that this section should be explicitly kept or removed. It would be > great if we could come to some kind of standard way of marking such > sections so we don't need special arguments for each such section or > at least have a more generic SECTION_STRIP_P macro. AFAIK the binutils `strip' does not strip .ctf sections. > Note, that this might not be possible, these sections might be to > different/specific that generalizing over them is impossible. But it > would be good to at least try and discuss it. If only so that elfutils > eu-strip and binutils strip agree on how to handle/coordinate on such > special sections. What about using an OS-specific section flag in elf.h, something like: #define SHF_GNU_PERSISTENT 0x0ff00001 /* Section must not be stripped. */ > > Cheers, > > Mark > >> Signed-off-by: Guillermo E. Martinez >> --- >> ChangeLog | 23 ++++ >> libebl/eblsectionstripp.c | 4 +- >> libebl/libebl.h | 2 +- >> libelf/elf-knowledge.h | 7 +- >> libelf/elf32_checksum.c | 2 +- >> src/elfcmp.c | 4 +- >> src/strip.c | 71 ++++++++-- >> tests/Makefile.am | 6 +- >> tests/run-strip-remove-keep-ctf.sh | 207 +++++++++++++++++++++++++++++ >> tests/testfile-ctf.bz2 | Bin 0 -> 3317 bytes >> 10 files changed, 304 insertions(+), 22 deletions(-) >> create mode 100755 tests/run-strip-remove-keep-ctf.sh >> create mode 100755 tests/testfile-ctf.bz2 >> >> diff --git a/ChangeLog b/ChangeLog >> index f1a14b5c..2b608866 100644 >> --- a/ChangeLog >> +++ b/ChangeLog >> @@ -1,3 +1,26 @@ >> +2022-05-21 Guillermo E. Martinez >> + >> + * libebl/eblsectionstripp.c (ebl_section_strip_p): Use >> + remove_ctf argument. >> + (SECTION_STRIP_P): Likewise. >> + * libebl/libebl.h (ebl_section_strip_p): Likewise. >> + * libelf/elf-knowledge.h (SECTION_STRIP_P): Update macro >> + definition to use remove_ctf to determine whether .ctf >> + section is stripped out. >> + * libelf/elf32_checksum.c (elfw2): Use false value for >> + remove_ctf parameter. >> + * src/elfcmp.c (main): Likewise. >> + * src/strip.c (options): Add --remove-ctf option set by >> + remove_ctf variable. >> + (set_remove_special_section_opt): Add new function. >> + (erratic_special_section_opt): Likewise. >> + (parse_opt): Parse new --remove-ctf option. >> + (handle_elf): Adjust .comment and use remove_ctf argument. >> + * tests/Makefile.am (TEST): Add run-strip-remove-keep-ctf.sh >> + and testfile-ctf.bz2. >> + * tests/run-strip-remove-keep-ctf.sh: Add new testcase. >> + * tests/testfile-ctf.bz2: Add new test harness. >> + >> 2022-05-02 Mark Wielaard >> >> * Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Remove >> diff --git a/libebl/eblsectionstripp.c b/libebl/eblsectionstripp.c >> index a5624ffe..f26cc170 100644 >> --- a/libebl/eblsectionstripp.c >> +++ b/libebl/eblsectionstripp.c >> @@ -37,7 +37,7 @@ >> bool >> ebl_section_strip_p (Ebl *ebl, const GElf_Shdr *shdr, >> const char *name, bool remove_comment, >> - bool only_remove_debug) >> + bool only_remove_debug, bool remove_ctf) >> { >> /* If only debug information should be removed check the name. There >> is unfortunately no other way. */ >> @@ -66,5 +66,5 @@ ebl_section_strip_p (Ebl *ebl, const GElf_Shdr *shdr, >> return false; >> } >> >> - return SECTION_STRIP_P (shdr, name, remove_comment); >> + return SECTION_STRIP_P (shdr, name, remove_comment, remove_ctf); >> } >> diff --git a/libebl/libebl.h b/libebl/libebl.h >> index 731001d3..067b769e 100644 >> --- a/libebl/libebl.h >> +++ b/libebl/libebl.h >> @@ -205,7 +205,7 @@ extern bool ebl_relative_reloc_p (Ebl *ebl, int reloc); >> /* Check whether section should be stripped. */ >> extern bool ebl_section_strip_p (Ebl *ebl, >> const GElf_Shdr *shdr, const char *name, >> - bool remove_comment, bool only_remove_debug); >> + bool remove_comment, bool only_remove_debug, bool remove_ctf); >> >> /* Check if backend uses a bss PLT in this file. */ >> extern bool ebl_bss_plt_p (Ebl *ebl); >> diff --git a/libelf/elf-knowledge.h b/libelf/elf-knowledge.h >> index 6e005fa5..903a0f4f 100644 >> --- a/libelf/elf-knowledge.h >> +++ b/libelf/elf-knowledge.h >> @@ -34,7 +34,7 @@ >> >> >> /* Test whether a section can be stripped or not. */ >> -#define SECTION_STRIP_P(shdr, name, remove_comment) \ >> +#define SECTION_STRIP_P(shdr, name, remove_comment, remove_ctf) \ >> /* Sections which are allocated are not removed. */ \ >> (((shdr)->sh_flags & SHF_ALLOC) == 0 \ >> /* We never remove .note sections. */ \ >> @@ -45,7 +45,10 @@ >> && strncmp (name, ".gnu.warning.", sizeof ".gnu.warning." - 1) != 0\ >> /* We remove .comment sections only if explicitly told to do so. */\ >> && (remove_comment \ >> - || strcmp (name, ".comment") != 0)))) >> + || strcmp (name, ".comment") != 0) \ >> + /* We remove .ctf sections only if explicitly told to do so. */\ >> + && (remove_ctf \ >> + || strcmp (name, ".ctf") != 0)))) >> >> >> /* Test whether `sh_info' field in section header contains a section >> diff --git a/libelf/elf32_checksum.c b/libelf/elf32_checksum.c >> index c5f27bbe..190bad7d 100644 >> --- a/libelf/elf32_checksum.c >> +++ b/libelf/elf32_checksum.c >> @@ -105,7 +105,7 @@ elfw2(LIBELFBITS,checksum) (Elf *elf) >> >> if (SECTION_STRIP_P (shdr, >> INTUSE(elf_strptr) (elf, shstrndx, shdr->sh_name), >> - true)) >> + true, false)) >> /* The section can be stripped. Don't use it. */ >> continue; >> >> diff --git a/src/elfcmp.c b/src/elfcmp.c >> index 21d8d9dc..76f15735 100644 >> --- a/src/elfcmp.c >> +++ b/src/elfcmp.c >> @@ -270,7 +270,7 @@ main (int argc, char *argv[]) >> sname1 = elf_strptr (elf1, shstrndx1, shdr1->sh_name); >> } >> while (scn1 != NULL && shdr1 != NULL >> - && ebl_section_strip_p (ebl1, shdr1, sname1, true, false)); >> + && ebl_section_strip_p (ebl1, shdr1, sname1, true, false, false)); >> >> GElf_Shdr shdr2_mem; >> GElf_Shdr *shdr2; >> @@ -283,7 +283,7 @@ main (int argc, char *argv[]) >> sname2 = elf_strptr (elf2, shstrndx2, shdr2->sh_name); >> } >> while (scn2 != NULL && shdr2 != NULL >> - && ebl_section_strip_p (ebl2, shdr2, sname2, true, false)); >> + && ebl_section_strip_p (ebl2, shdr2, sname2, true, false, false)); >> >> if (scn1 == NULL || scn2 == NULL || shdr1 == NULL || shdr2 == NULL) >> break; >> diff --git a/src/strip.c b/src/strip.c >> index 452b1279..6f79a1d0 100644 >> --- a/src/strip.c >> +++ b/src/strip.c >> @@ -62,6 +62,7 @@ ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; >> #define OPT_RELOC_DEBUG 0x103 >> #define OPT_KEEP_SECTION 0x104 >> #define OPT_RELOC_DEBUG_ONLY 0x105 >> +#define OPT_REMOVE_CTF 0x106 >> >> >> /* Definitions of arguments for argp functions. */ >> @@ -87,6 +88,8 @@ static const struct argp_option options[] = >> N_("Similar to --reloc-debug-sections, but resolve all trivial > relocations between debug sections in place. No other stripping is > performed (operation is not reversible, incompatible with -f, -g, > --remove-comment and --remove-section)"), 0 }, >> { "remove-comment", OPT_REMOVE_COMMENT, NULL, 0, >> N_("Remove .comment section"), 0 }, >> + { "remove-ctf", OPT_REMOVE_CTF, NULL, 0, >> + N_("Remove .ctf section"), 0 }, >> { "remove-section", 'R', "SECTION", 0, N_("Remove the named section. > SECTION is an extended wildcard pattern. May be given more than once. > Only non-allocated sections can be removed."), 0 }, >> { "keep-section", OPT_KEEP_SECTION, "SECTION", 0, N_("Keep the named > section. SECTION is an extended wildcard pattern. May be given more > than once."), 0 }, >> { "permissive", OPT_PERMISSIVE, NULL, 0, >> @@ -150,6 +153,9 @@ static bool preserve_dates; >> /* If true .comment sections will be removed. */ >> static bool remove_comment; >> >> +/* If true .ctf sections will be removed. */ >> +static bool remove_ctf; >> + >> /* If true remove all debug sections. */ >> static bool remove_debug; >> >> @@ -217,6 +223,48 @@ section_name_matches (struct section_pattern *patterns, const char *name) >> return false; >> } >> >> +static void >> +set_remove_special_section_opt (const char *arg) >> +{ >> + if (fnmatch (arg, ".comment", FNM_EXTMATCH) == 0) >> + remove_comment = true; >> + else if (fnmatch (arg, ".ctf", FNM_EXTMATCH) == 0) >> + remove_ctf = true; >> +} >> + >> +static error_t >> +erratic_special_section_opt (struct argp_state *state) >> +{ >> + int s; >> + struct { >> + const char *name; >> + bool remove; >> + } special_secs[] = { >> + { >> + .name = ".comment", >> + .remove = remove_comment >> + }, >> + { >> + .name = ".ctf", >> + .remove = remove_ctf >> + }, >> + { >> + .name = NULL, >> + } >> + }; >> + >> + for (s = 0; special_secs[s].name; ++s) >> + if (special_secs[s].remove == true >> + && section_name_matches (keep_secs, special_secs[s].name)) >> + { >> + argp_error (state, >> + _("cannot both keep and remove %s section"), >> + special_secs[s].name); >> + return EINVAL; >> + } >> + >> + return 0; >> +} >> >> int >> main (int argc, char *argv[]) >> @@ -325,9 +373,12 @@ parse_opt (int key, char *arg, struct argp_state *state) >> remove_comment = true; >> break; >> >> + case OPT_REMOVE_CTF: >> + remove_ctf = true; >> + break; >> + >> case 'R': >> - if (fnmatch (arg, ".comment", FNM_EXTMATCH) == 0) >> - remove_comment = true; >> + set_remove_special_section_opt (arg); >> add_pattern (&remove_secs, arg); >> break; >> >> @@ -353,13 +404,8 @@ parse_opt (int key, char *arg, struct argp_state *state) >> break; >> >> case ARGP_KEY_SUCCESS: >> - if (remove_comment == true >> - && section_name_matches (keep_secs, ".comment")) >> - { >> - argp_error (state, >> - _("cannot both keep and remove .comment section")); >> - return EINVAL; >> - } >> + if (erratic_special_section_opt (state)) >> + return EINVAL; >> break; >> >> default: >> @@ -1358,7 +1404,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, >> all sections which are not used at runtime are stripped out. But >> there are a few exceptions: >> >> - - special sections named ".comment" and ".note" are kept >> + - special sections named ".comment", ".note" and ".ctf" are kept >> - OS or architecture specific sections are kept since we might not >> know how to handle them >> - if a section is referred to from a section which is not removed >> @@ -1371,7 +1417,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, >> if (remove_shdrs ? !(shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) >> : (ebl_section_strip_p (ebl, &shdr_info[cnt].shdr, >> shdr_info[cnt].name, remove_comment, >> - remove_debug) >> + remove_debug, remove_ctf) >> || cnt == shstrndx >> || section_name_matches (remove_secs, shdr_info[cnt].name))) >> { >> @@ -1534,7 +1580,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, >> &shdr_info[scnidx].shdr, >> shdr_info[scnidx].name, >> remove_comment, >> - remove_debug) >> + remove_debug, >> + remove_ctf) >> && ebl_data_marker_symbol (ebl, sym, >> elf_strptr (elf, >> shdr_info[cnt].shdr.sh_link, >> diff --git a/tests/Makefile.am b/tests/Makefile.am >> index 84c3950a..f30d958e 100644 >> --- a/tests/Makefile.am >> +++ b/tests/Makefile.am >> @@ -197,7 +197,8 @@ TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \ >> msg_tst system-elf-libelf-test \ >> $(asm_TESTS) run-disasm-bpf.sh run-low_high_pc-dw-form-indirect.sh \ >> run-nvidia-extended-linemap-libdw.sh run-nvidia-extended-linemap-readelf.sh \ >> - run-readelf-dw-form-indirect.sh run-strip-largealign.sh >> + run-readelf-dw-form-indirect.sh run-strip-largealign.sh \ >> + run-strip-remove-keep-ctf.sh >> >> if !BIARCH >> export ELFUTILS_DISABLE_BIARCH = 1 >> @@ -580,7 +581,8 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \ >> run-readelf-dw-form-indirect.sh testfile-dw-form-indirect.bz2 \ >> run-nvidia-extended-linemap-libdw.sh run-nvidia-extended-linemap-readelf.sh \ >> testfile_nvidia_linemap.bz2 \ >> - testfile-largealign.o.bz2 run-strip-largealign.sh >> + testfile-largealign.o.bz2 run-strip-largealign.sh \ >> + testfile-ctf.bz2 run-strip-remove-keep-ctf.sh >> >> >> if USE_VALGRIND >> diff --git a/tests/run-strip-remove-keep-ctf.sh b/tests/run-strip-remove-keep-ctf.sh >> new file mode 100755 >> index 00000000..1a9bd93b >> --- /dev/null >> +++ b/tests/run-strip-remove-keep-ctf.sh >> @@ -0,0 +1,207 @@ >> +#! /bin/sh >> +# Copyright (C) 2022 Oracle, Inc. >> +# This file is part of elfutils. >> +# >> +# This file is free software; you can redistribute it and/or modify >> +# it under the terms of the GNU General Public License as published by >> +# the Free Software Foundation; either version 3 of the License, or >> +# (at your option) any later version. >> +# >> +# elfutils is distributed in the hope that it will be useful, but >> +# WITHOUT ANY WARRANTY; without even the implied warranty of >> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +# GNU General Public License for more details. >> +# >> +# You should have received a copy of the GNU General Public License >> +# along with this program. If not, see . >> + >> +. $srcdir/test-subr.sh >> + >> +# strip -o output and -f debug files >> +tempfiles testfile.elf testfile.debug >> + >> +# A random 32bit testfile >> +testfiles testfile-ctf >> + >> +# strip should keep .ctf section >> +echo strip testfile-ctf >> +testrun ${abs_top_builddir}/src/strip -o testfile.elf -f testfile.debug testfile-ctf >> +echo elflint testfile.elf >> +testrun ${abs_top_builddir}/src/elflint --gnu testfile.elf >> +echo elflint testfile.debug >> +testrun ${abs_top_builddir}/src/elflint --gnu -d testfile.debug >> +echo readelf testfile.elf >> +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.elf <<\EOF >> +There are 30 section headers, starting at offset 0x3330: >> + >> +Section Headers: >> +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al >> +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 >> +[ 1] .interp PROGBITS 0000000000400318 00000318 0000001c 0 A 0 0 1 >> +[ 2] .note.gnu.property NOTE 0000000000400338 00000338 00000020 0 A 0 0 8 >> +[ 3] .note.ABI-tag NOTE 0000000000400358 00000358 00000020 0 A 0 0 4 >> +[ 4] .hash HASH 0000000000400378 00000378 00000028 4 A 6 0 8 >> +[ 5] .gnu.hash GNU_HASH 00000000004003a0 000003a0 0000001c 0 A 6 0 8 >> +[ 6] .dynsym DYNSYM 00000000004003c0 000003c0 00000078 24 A 7 1 8 >> +[ 7] .dynstr STRTAB 0000000000400438 00000438 00000057 0 A 0 0 1 >> +[ 8] .gnu.version GNU_versym 0000000000400490 00000490 0000000a 2 A 6 0 2 >> +[ 9] .gnu.version_r GNU_verneed 00000000004004a0 000004a0 00000030 0 A 7 1 8 >> +[10] .rela.dyn RELA 00000000004004d0 000004d0 00000030 24 A 6 0 8 >> +[11] .rela.plt RELA 0000000000400500 00000500 00000030 24 AI 6 23 8 >> +[12] .init PROGBITS 0000000000401000 00001000 00000017 0 AX 0 0 4 >> +[13] .plt PROGBITS 0000000000401020 00001020 00000030 16 AX 0 0 16 >> +[14] .text PROGBITS 0000000000401050 00001050 000001d1 0 AX 0 0 16 >> +[15] .fini PROGBITS 0000000000401224 00001224 00000009 0 AX 0 0 4 >> +[16] .rodata PROGBITS 0000000000402000 00002000 00000010 0 A 0 0 4 >> +[17] .eh_frame_hdr PROGBITS 0000000000402010 00002010 0000003c 0 A 0 0 4 >> +[18] .eh_frame PROGBITS 0000000000402050 00002050 00000100 0 A 0 0 8 >> +[19] .init_array INIT_ARRAY 0000000000403e00 00002e00 00000008 8 WA 0 0 8 >> +[20] .fini_array FINI_ARRAY 0000000000403e08 00002e08 00000008 8 WA 0 0 8 >> +[21] .dynamic DYNAMIC 0000000000403e10 00002e10 000001e0 16 WA 7 0 8 >> +[22] .got PROGBITS 0000000000403ff0 00002ff0 00000010 8 WA 0 0 8 >> +[23] .got.plt PROGBITS 0000000000404000 00003000 00000028 8 WA 0 0 8 >> +[24] .data PROGBITS 0000000000404028 00003028 00000010 0 WA 0 0 8 >> +[25] .bss NOBITS 0000000000404038 00003038 00000008 0 WA 0 0 4 >> +[26] .comment PROGBITS 0000000000000000 00003038 0000002a 1 MS 0 0 1 >> +[27] .ctf PROGBITS 0000000000000000 00003062 000001af 0 0 0 1 >> +[28] .gnu_debuglink PROGBITS 0000000000000000 00003214 00000014 0 0 0 4 >> +[29] .shstrtab STRTAB 0000000000000000 00003228 00000107 0 0 0 1 >> + >> +EOF >> +echo readelf testfile.debug >> +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.debug <<\EOF >> +There are 37 section headers, starting at offset 0xdf0: >> + >> +Section Headers: >> +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al >> +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 >> +[ 1] .interp NOBITS 0000000000400318 00000318 0000001c 0 A 0 0 1 >> +[ 2] .note.gnu.property NOTE 0000000000400338 00000318 00000020 0 A 0 0 8 >> +[ 3] .note.ABI-tag NOTE 0000000000400358 00000338 00000020 0 A 0 0 4 >> +[ 4] .hash NOBITS 0000000000400378 00000358 00000028 4 A 6 0 8 >> +[ 5] .gnu.hash NOBITS 00000000004003a0 00000358 0000001c 0 A 6 0 8 >> +[ 6] .dynsym NOBITS 00000000004003c0 00000358 00000078 24 A 7 1 8 >> +[ 7] .dynstr NOBITS 0000000000400438 00000358 00000057 0 A 0 0 1 >> +[ 8] .gnu.version NOBITS 0000000000400490 00000358 0000000a 2 A 6 0 2 >> +[ 9] .gnu.version_r NOBITS 00000000004004a0 00000358 00000030 0 A 7 1 8 >> +[10] .rela.dyn NOBITS 00000000004004d0 00000358 00000030 24 A 6 0 8 >> +[11] .rela.plt NOBITS 0000000000400500 00000358 00000030 24 AI 6 23 8 >> +[12] .init NOBITS 0000000000401000 00000358 00000017 0 AX 0 0 4 >> +[13] .plt NOBITS 0000000000401020 00000360 00000030 16 AX 0 0 16 >> +[14] .text NOBITS 0000000000401050 00000360 000001d1 0 AX 0 0 16 >> +[15] .fini NOBITS 0000000000401224 00000360 00000009 0 AX 0 0 4 >> +[16] .rodata NOBITS 0000000000402000 00000360 00000010 0 A 0 0 4 >> +[17] .eh_frame_hdr NOBITS 0000000000402010 00000360 0000003c 0 A 0 0 4 >> +[18] .eh_frame NOBITS 0000000000402050 00000360 00000100 0 A 0 0 8 >> +[19] .init_array NOBITS 0000000000403e00 00000360 00000008 8 WA 0 0 8 >> +[20] .fini_array NOBITS 0000000000403e08 00000360 00000008 8 WA 0 0 8 >> +[21] .dynamic NOBITS 0000000000403e10 00000360 000001e0 16 WA 7 0 8 >> +[22] .got NOBITS 0000000000403ff0 00000360 00000010 8 WA 0 0 8 >> +[23] .got.plt NOBITS 0000000000404000 00000360 00000028 8 WA 0 0 8 >> +[24] .data NOBITS 0000000000404028 00000360 00000010 0 WA 0 0 8 >> +[25] .bss NOBITS 0000000000404038 00000360 00000008 0 WA 0 0 4 >> +[26] .comment NOBITS 0000000000000000 00000360 0000002a 1 MS 0 0 1 >> +[27] .ctf NOBITS 0000000000000000 00000360 000001af 0 0 0 1 >> +[28] .debug_aranges PROGBITS 0000000000000000 00000360 00000030 0 0 0 1 >> +[29] .debug_info PROGBITS 0000000000000000 00000390 00000121 0 0 0 1 >> +[30] .debug_abbrev PROGBITS 0000000000000000 000004b1 000000b6 0 0 0 1 >> +[31] .debug_line PROGBITS 0000000000000000 00000567 00000063 0 0 0 1 >> +[32] .debug_str PROGBITS 0000000000000000 000005ca 000000ba 1 MS 0 0 1 >> +[33] .debug_line_str PROGBITS 0000000000000000 00000684 0000005c 1 MS 0 0 1 >> +[34] .symtab SYMTAB 0000000000000000 000006e0 000003c0 24 35 21 8 >> +[35] .strtab STRTAB 0000000000000000 00000aa0 000001f1 0 0 0 1 >> +[36] .shstrtab STRTAB 0000000000000000 00000c91 00000158 0 0 0 1 >> + >> +EOF >> + >> +# Explicitly removes .ctf section >> +echo strip --remove-ctf testfile >> +testrun ${abs_top_builddir}/src/strip --remove-ctf -o testfile.elf > -f testfile.debug testfile-ctf >> +echo elflint testfile.elf >> +testrun ${abs_top_builddir}/src/elflint --gnu testfile.elf >> +echo elflint testfile.debug >> +testrun ${abs_top_builddir}/src/elflint --gnu -d testfile.debug >> +echo readelf testfile.elf >> +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.elf <<\EOF >> +There are 29 section headers, starting at offset 0x3180: >> + >> +Section Headers: >> +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al >> +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 >> +[ 1] .interp PROGBITS 0000000000400318 00000318 0000001c 0 A 0 0 1 >> +[ 2] .note.gnu.property NOTE 0000000000400338 00000338 00000020 0 A 0 0 8 >> +[ 3] .note.ABI-tag NOTE 0000000000400358 00000358 00000020 0 A 0 0 4 >> +[ 4] .hash HASH 0000000000400378 00000378 00000028 4 A 6 0 8 >> +[ 5] .gnu.hash GNU_HASH 00000000004003a0 000003a0 0000001c 0 A 6 0 8 >> +[ 6] .dynsym DYNSYM 00000000004003c0 000003c0 00000078 24 A 7 1 8 >> +[ 7] .dynstr STRTAB 0000000000400438 00000438 00000057 0 A 0 0 1 >> +[ 8] .gnu.version GNU_versym 0000000000400490 00000490 0000000a 2 A 6 0 2 >> +[ 9] .gnu.version_r GNU_verneed 00000000004004a0 000004a0 00000030 0 A 7 1 8 >> +[10] .rela.dyn RELA 00000000004004d0 000004d0 00000030 24 A 6 0 8 >> +[11] .rela.plt RELA 0000000000400500 00000500 00000030 24 AI 6 23 8 >> +[12] .init PROGBITS 0000000000401000 00001000 00000017 0 AX 0 0 4 >> +[13] .plt PROGBITS 0000000000401020 00001020 00000030 16 AX 0 0 16 >> +[14] .text PROGBITS 0000000000401050 00001050 000001d1 0 AX 0 0 16 >> +[15] .fini PROGBITS 0000000000401224 00001224 00000009 0 AX 0 0 4 >> +[16] .rodata PROGBITS 0000000000402000 00002000 00000010 0 A 0 0 4 >> +[17] .eh_frame_hdr PROGBITS 0000000000402010 00002010 0000003c 0 A 0 0 4 >> +[18] .eh_frame PROGBITS 0000000000402050 00002050 00000100 0 A 0 0 8 >> +[19] .init_array INIT_ARRAY 0000000000403e00 00002e00 00000008 8 WA 0 0 8 >> +[20] .fini_array FINI_ARRAY 0000000000403e08 00002e08 00000008 8 WA 0 0 8 >> +[21] .dynamic DYNAMIC 0000000000403e10 00002e10 000001e0 16 WA 7 0 8 >> +[22] .got PROGBITS 0000000000403ff0 00002ff0 00000010 8 WA 0 0 8 >> +[23] .got.plt PROGBITS 0000000000404000 00003000 00000028 8 WA 0 0 8 >> +[24] .data PROGBITS 0000000000404028 00003028 00000010 0 WA 0 0 8 >> +[25] .bss NOBITS 0000000000404038 00003038 00000008 0 WA 0 0 4 >> +[26] .comment PROGBITS 0000000000000000 00003038 0000002a 1 MS 0 0 1 >> +[27] .gnu_debuglink PROGBITS 0000000000000000 00003064 00000014 0 0 0 4 >> +[28] .shstrtab STRTAB 0000000000000000 00003078 00000102 0 0 0 1 >> + >> +EOF >> +echo readelf testfile.debug >> +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.debug <<\EOF >> +There are 37 section headers, starting at offset 0xfa0: >> + >> +Section Headers: >> +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al >> +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 >> +[ 1] .interp NOBITS 0000000000400318 00000318 0000001c 0 A 0 0 1 >> +[ 2] .note.gnu.property NOTE 0000000000400338 00000318 00000020 0 A 0 0 8 >> +[ 3] .note.ABI-tag NOTE 0000000000400358 00000338 00000020 0 A 0 0 4 >> +[ 4] .hash NOBITS 0000000000400378 00000358 00000028 4 A 6 0 8 >> +[ 5] .gnu.hash NOBITS 00000000004003a0 00000358 0000001c 0 A 6 0 8 >> +[ 6] .dynsym NOBITS 00000000004003c0 00000358 00000078 24 A 7 1 8 >> +[ 7] .dynstr NOBITS 0000000000400438 00000358 00000057 0 A 0 0 1 >> +[ 8] .gnu.version NOBITS 0000000000400490 00000358 0000000a 2 A 6 0 2 >> +[ 9] .gnu.version_r NOBITS 00000000004004a0 00000358 00000030 0 A 7 1 8 >> +[10] .rela.dyn NOBITS 00000000004004d0 00000358 00000030 24 A 6 0 8 >> +[11] .rela.plt NOBITS 0000000000400500 00000358 00000030 24 AI 6 23 8 >> +[12] .init NOBITS 0000000000401000 00000358 00000017 0 AX 0 0 4 >> +[13] .plt NOBITS 0000000000401020 00000360 00000030 16 AX 0 0 16 >> +[14] .text NOBITS 0000000000401050 00000360 000001d1 0 AX 0 0 16 >> +[15] .fini NOBITS 0000000000401224 00000360 00000009 0 AX 0 0 4 >> +[16] .rodata NOBITS 0000000000402000 00000360 00000010 0 A 0 0 4 >> +[17] .eh_frame_hdr NOBITS 0000000000402010 00000360 0000003c 0 A 0 0 4 >> +[18] .eh_frame NOBITS 0000000000402050 00000360 00000100 0 A 0 0 8 >> +[19] .init_array NOBITS 0000000000403e00 00000360 00000008 8 WA 0 0 8 >> +[20] .fini_array NOBITS 0000000000403e08 00000360 00000008 8 WA 0 0 8 >> +[21] .dynamic NOBITS 0000000000403e10 00000360 000001e0 16 WA 7 0 8 >> +[22] .got NOBITS 0000000000403ff0 00000360 00000010 8 WA 0 0 8 >> +[23] .got.plt NOBITS 0000000000404000 00000360 00000028 8 WA 0 0 8 >> +[24] .data NOBITS 0000000000404028 00000360 00000010 0 WA 0 0 8 >> +[25] .bss NOBITS 0000000000404038 00000360 00000008 0 WA 0 0 4 >> +[26] .comment NOBITS 0000000000000000 00000360 0000002a 1 MS 0 0 1 >> +[27] .ctf PROGBITS 0000000000000000 00000360 000001af 0 0 0 1 >> +[28] .debug_aranges PROGBITS 0000000000000000 0000050f 00000030 0 0 0 1 >> +[29] .debug_info PROGBITS 0000000000000000 0000053f 00000121 0 0 0 1 >> +[30] .debug_abbrev PROGBITS 0000000000000000 00000660 000000b6 0 0 0 1 >> +[31] .debug_line PROGBITS 0000000000000000 00000716 00000063 0 0 0 1 >> +[32] .debug_str PROGBITS 0000000000000000 00000779 000000ba 1 MS 0 0 1 >> +[33] .debug_line_str PROGBITS 0000000000000000 00000833 0000005c 1 MS 0 0 1 >> +[34] .symtab SYMTAB 0000000000000000 00000890 000003c0 24 35 21 8 >> +[35] .strtab STRTAB 0000000000000000 00000c50 000001f1 0 0 0 1 >> +[36] .shstrtab STRTAB 0000000000000000 00000e41 00000158 0 0 0 1 >> + >> +EOF >> + >> +exit 0 >> diff --git a/tests/testfile-ctf.bz2 b/tests/testfile-ctf.bz2 >> new file mode 100755 >> index 0000000000000000000000000000000000000000..af909af0fe7b7d88f11426e349e867e39fddfafd >> GIT binary patch >> literal 3317 >> zcmVool$yNRQ >> z{a*L~|6kw>L^-~iz!v3`m9t8Amleo4T#|O$(vEkAge1Wxr> zCZ;kcq&-ck>NZ63n@P1crqp@}KT>IKYBHv}y*X >> zKqEq8YMum7N$DPx^o=q!(WaROk5FloMuv?8Mu5;70009u4Ff;`4Ff;`8UO$QXb@-s >> zG#UUj02(yV0Lh>L27#b7Gz@?M84V2p8UWKk0~0}z0iXZ?(8-V(NQ6x^6I1j=^z{j} >> zjj5sPVj2cOdLRQ4> z0000q05sE00j7X7G8qh-007W50BAH~WCV&JK{9A+dSs`jjRa;>O$>&ChDqrF13(6h >> zhJa`Rp{9dC20#D+00E!?000dQgL> zJ~zIi1O(xc2HK(}8S80vR`#> zcLvOhr=;J~s6JS#DhNtKJm|peVqO{MlASBf309883O=agQ}b!irZ5vWh1p$Xli^Nz >> zNX{g}?*Rx_WAns}^k+Pv2z >> zmT4r<=(QRNWZs^K=JuE9yEN`}PZb1Z2>}WPb36{dd2Ft~PngBR$z(0xTQ6y$-rS-l >> z-I!@aNf|=YKK@d%p7<4LK0|Wl-sqR1Z >> z(#M|P@;JOHpw6`nIu2I@M~(k%d2NB9Jr9zXQV@j0NY_0}#%K`QOI3@OFX0Gd>2oq- >> zIyBwY-l9P08o0qC!WDBAKx*H9N!psPsj#BBL_mh;6#)> zV5xdng#egB`#ozdfNSOo>*TWfl >> z7u?1lMSU5B_IhfN%7fFL8pUdeHdE^q%Sl6+r5+p#tA&L@yQpqfzfpBfmb*vZ+*GM% >> zWuYv2R#%n~cW#D|9p07-L^OenNwEQR%1kR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