From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3B95D385842C; Fri, 28 Oct 2022 23:06:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B95D385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666998370; bh=oLC9huxA5au96d9lnewtjVmehdEUSg6a9k9OqtGI2+E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ywQLzvX5Ng2f6Wx12NGtP2vdyuI4W4kEZegUplg1RNCK+6wY2mLlInxl5oGKMW1ho GfsZuw2tJ5eZ14HdwQGk2ug1Qr6lMvYr8QvdvmQ0MQzT/U17CxIfTlLgMcr0eGLf8U F7EKJMCzvZ5bjNMLrFeoDOeIyp9PPxt9I7XQZyKI= From: "jpalus at fastmail dot com" To: elfutils-devel@sourceware.org Subject: [Bug tools/29498] Is it expected that eu-strip strips .note.GNU-stack Date: Fri, 28 Oct 2022 23:06:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: tools X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jpalus at fastmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29498 --- Comment #3 from Jan Palus --- If I understand it correctly in binutils primary criteria for removing sect= ion is whether it is marked with SEC_DEBUGGING flag: https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dblob;f=3Dbinutils/objc= opy.c;h=3Dd20aaef9f4f2e2a910bd7bf666dab6e3c158fc1b;hb=3DHEAD#l1366 and the flag for ELF seems to be set here: https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dblob;f=3Dbfd/elf.c;h= =3D81825b748d75f2b68a6cca1c54b126df53c36dc2;hb=3DHEAD#l1093 if (startswith (name, ".debug") || startswith (name, ".gnu.debuglto_.debug_") || startswith (name, ".gnu.linkonce.wi.") || startswith (name, ".zdebug")) flags |=3D SEC_DEBUGGING | SEC_ELF_OCTETS; else if (startswith (name, GNU_BUILD_ATTRS_SECTION_NAME) || startswith (name, ".note.gnu")) { flags |=3D SEC_ELF_OCTETS; opb =3D 1; } else if (startswith (name, ".line") || startswith (name, ".stab") || strcmp (name, ".gdb_index") =3D=3D 0) flags |=3D SEC_DEBUGGING; --=20 You are receiving this mail because: You are on the CC list for the bug.=