public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "alex.wabik at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/104834] visibility=hidden ignored for template instantiations for certain dependent types
Date: Tue, 08 Mar 2022 08:12:18 +0000	[thread overview]
Message-ID: <bug-104834-4-APBl37sBA3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104834-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Aleksander Wabik <alex.wabik at gmail dot com> ---
Default visiblity symbols in the object file generated by the compilation:

- in GCC:
$ readelf -sW test.o | grep -v UND | grep -v SECTION | grep  DEFAULT
     1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS test.cc
    10: 0000000000000000    40 FUNC    LOCAL  DEFAULT   21 _Z7PubFuncv.cold
    30: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT    2
_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN10ThreadTestC4EvEUlvE_EEEEED5Ev
    46: 0000000000000000    40 OBJECT  WEAK   DEFAULT   31
_ZTVNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN10ThreadTestC4EvEUlvE_EEEEEE
    51: 0000000000000000   127 FUNC    GLOBAL DEFAULT   12 _Z7PubFuncv
    60: 0000000000000000     4 FUNC    WEAK   DEFAULT   24
_ZN3aaa7WrapperI12PublicStructE3getEv
    62: 0000000000000000     4 FUNC    WEAK   DEFAULT   26
_ZN3aaa7WrapperI10ThisIsEnumE3getEv
    63: 0000000000000000     4 FUNC    WEAK   DEFAULT   27
_ZN3aaa7WrapperI10PublicEnumE3getEv

- in clang:
$ readelf -sW test.o | grep -v UND | grep -v SECTION | grep  DEFAULT
     1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS test.cc
     2: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT    4 GCC_except_table0
    21: 0000000000000000   151 FUNC    GLOBAL DEFAULT    2 _Z7PubFuncv
    22: 0000000000000000     4 FUNC    WEAK   DEFAULT   12
_ZN3aaa7WrapperI10PublicEnumE3getEv
    25: 0000000000000000     4 FUNC    WEAK   DEFAULT    6
_ZN3aaa7WrapperI12PublicStructE3getEv

  reply	other threads:[~2022-03-08  8:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08  8:07 [Bug c++/104834] New: " alex.wabik at gmail dot com
2022-03-08  8:12 ` alex.wabik at gmail dot com [this message]
2022-03-08  8:26 ` [Bug c++/104834] " pinskia at gcc dot gnu.org
2022-03-08  8:27 ` rguenth at gcc dot gnu.org
2022-03-08  8:27 ` rguenth at gcc dot gnu.org
2022-03-08  8:28 ` pinskia at gcc dot gnu.org
2022-03-08  8:35 ` alex.wabik at gmail dot com

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-104834-4-APBl37sBA3@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).