public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-115170-4-dn7aodXUB5@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115170-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115170

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Cristian Rodríguez from comment #6)
> I found it in executable made with current GCC HEAD on x86_64.. 
> 
> It is sufficient to demonstrate with the example code here
> 
> https://en.cppreference.com/w/c/program/atexit
> 
> ggcc-15 -march=native -Wall -Wextra -O2 -g -fPIE (or -fPIC) -fhardened
> -fno-plt example.c
> 
> 
> 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.

  parent reply	other threads:[~2024-05-21 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21  2:57 [Bug c/115170] New: " crrodriguez at opensuse dot org
2024-05-21  3:09 ` [Bug middle-end/115170] " pinskia at gcc dot gnu.org
2024-05-21  3:11 ` pinskia at gcc dot gnu.org
2024-05-21  3:13 ` pinskia at gcc dot gnu.org
2024-05-21  4:18 ` pinskia at gcc dot gnu.org
2024-05-21  4:23 ` pinskia at gcc dot gnu.org
2024-05-21 15:43 ` crrodriguez at opensuse dot org
2024-05-21 16:00 ` pinskia at gcc dot gnu.org [this message]
2024-05-23 20:08 ` crrodriguez at opensuse dot org
2024-05-24 11:41 ` amonakov at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-115170-4-dn7aodXUB5@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).