public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jozef Lawrynowicz <jozefl@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-5822] doc: "used" attribute saves decls from linker garbage collection Date: Mon, 7 Dec 2020 14:28:46 +0000 (GMT) [thread overview] Message-ID: <20201207142846.A81663894C31@sourceware.org> (raw) https://gcc.gnu.org/g:724390745213d5192af04a51bb08cf44da7c396d commit r11-5822-g724390745213d5192af04a51bb08cf44da7c396d Author: Jozef Lawrynowicz <jozef.l@mittosystems.com> Date: Mon Dec 7 14:26:46 2020 +0000 doc: "used" attribute saves decls from linker garbage collection gcc/ChangeLog: * doc/extend.texi (used function attribute): Document saving the declaration from linker garbage collection. (used variable attribute): Likewise. Diff: --- gcc/doc/extend.texi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index fd282aa0157..0c969085d1f 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -3859,6 +3859,14 @@ When applied to a member function of a C++ class template, the attribute also means that the function is instantiated if the class itself is instantiated. +For ELF targets that support the GNU or FreeBSD OSABIs, this attribute +will also save the function from linker garbage collection. To support +this behavior, functions that have not been placed in specific sections +(e.g. by the @code{section} attribute, or the @code{-ffunction-sections} +option), will be placed in new, unique sections. + +This additional functionality requires Binutils version 2.36 or later. + @item visibility ("@var{visibility_type}") @cindex @code{visibility} function attribute This attribute affects the linkage of the declaration to which it is attached. @@ -7420,6 +7428,14 @@ When applied to a static data member of a C++ class template, the attribute also means that the member is instantiated if the class itself is instantiated. +For ELF targets that support the GNU or FreeBSD OSABIs, this attribute +will also save the variable from linker garbage collection. To support +this behavior, variables that have not been placed in specific sections +(e.g. by the @code{section} attribute, or the @code{-fdata-sections} option), +will be placed in new, unique sections. + +This additional functionality requires Binutils version 2.36 or later. + @item vector_size (@var{bytes}) @cindex @code{vector_size} variable attribute This attribute specifies the vector size for the type of the declared
reply other threads:[~2020-12-07 14:28 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201207142846.A81663894C31@sourceware.org \ --to=jozefl@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).