From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA8CC3858C78; Tue, 21 May 2024 16:00:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA8CC3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716307206; bh=w2pvC2+qE6E1Bzj/MzyfBfDiHQ5PToHaNMHnilIPD48=; h=From:To:Subject:Date:In-Reply-To:References:From; b=n78J92v+NIZnWNGMUqx4kU/mR5TCLHf2aA2vgEnDqvHBdi5oZMOzGeia/rZodrwVJ S/Q1MhJrfrCRmsKvw8p0DEgwLneJQjxsEPZ/Ac+RxSa1FHSMd3oF7w9O1OkxgH3wxs 1OkS3wUgQLcUYVS5JKagTH5qyfX//Hd/PiyYKmVc= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/115170] __cxa_atexit@plt even if -fno-plt Date: Tue, 21 May 2024 16:00:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 15.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115170 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |INVALID --- Comment #7 from Andrew Pinski --- (In reply to Cristian Rodr=C3=ADguez from comment #6) > I found it in executable made with current GCC HEAD on x86_64..=20 >=20 > It is sufficient to demonstrate with the example code here >=20 > https://en.cppreference.com/w/c/program/atexit >=20 > ggcc-15 -march=3Dnative -Wall -Wextra -O2 -g -fPIE (or -fPIC) -fhardened > -fno-plt example.c >=20 >=20 > 1172: call 1040 <__cxa_finalize@plt> > 11fd: jmp 1050 <__cxa_atexit@plt> That is coming from already compiled code in crt*.o. __cxa_finalize is from __do_global_dtors_aux in crtstuff.c from libgcc. This is not from newly compiled code that you used -fno-plt with.=