public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed][wwwdocs] gcc-11/changes: "used" attribute saves decls from linker garbage collection
@ 2020-12-07 14:57 Jozef Lawrynowicz
  2020-12-14 23:48 ` Gerald Pfeifer
  0 siblings, 1 reply; 3+ messages in thread
From: Jozef Lawrynowicz @ 2020-12-07 14:57 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

Since 6fbec038f7a, the "used" attribute will save the symbol declaration
it is applied to from linker garbage collection, if the target supports
the SHF_GNU_RETAIN section flag.

This patch documents this functionality in the GCC 11 changes document.
Some users might need to amend their source code to handle the fact that
GCC can now place "used" decls in a new, unique section.

Committed as obvious.

[-- Attachment #2: 0001-gcc-11-changes-used-attribute-saves-decls-from-linke.patch --]
[-- Type: text/plain, Size: 1181 bytes --]

From 7c56c86ebe102849ec239f0c57e93988169d90f4 Mon Sep 17 00:00:00 2001
From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
Date: Mon, 7 Dec 2020 14:41:13 +0000
Subject: [PATCH] gcc-11/changes: "used" attribute saves decls from linker
 garbage collection

---
 htdocs/gcc-11/changes.html | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html
index ed289744..4d3efed5 100644
--- a/htdocs/gcc-11/changes.html
+++ b/htdocs/gcc-11/changes.html
@@ -158,6 +158,18 @@ a work-in-progress.</p>
       </li>
     </ul>
   </li>
+  <li>
+    For ELF targets that support the GNU or FreeBSD OSABIs, the
+    <code>used</code> attribute will now save the symbol declaration it is
+    applied to from linker garbage collection.
+    <br>
+    To support this behavior, <code>used</code> symbols that have not
+    been placed in specific sections (e.g. with the <code>section</code>
+    attribute, or the <code>-f{function,data}-sections</code> options) will
+    be placed in new, unique sections.
+    <br>
+    This functionality requires Binutils version 2.36 or later.
+  </li>
 </ul>
 
 <h3 id="cxx">C++</h3>
-- 
2.29.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [committed][wwwdocs] gcc-11/changes: "used" attribute saves decls from linker garbage collection
  2020-12-07 14:57 [committed][wwwdocs] gcc-11/changes: "used" attribute saves decls from linker garbage collection Jozef Lawrynowicz
@ 2020-12-14 23:48 ` Gerald Pfeifer
  2020-12-15 11:25   ` Jozef Lawrynowicz
  0 siblings, 1 reply; 3+ messages in thread
From: Gerald Pfeifer @ 2020-12-14 23:48 UTC (permalink / raw)
  To: Jozef Lawrynowicz; +Cc: gcc-patches

On Mon, 7 Dec 2020, Jozef Lawrynowicz wrote:
> Committed as obvious.

Thank you!

+  <li>
+    For ELF targets that support the GNU or FreeBSD OSABIs, the
+    <code>used</code> attribute will now save the symbol declaration it is
+    applied to from linker garbage collection.
+    <br>
+    To support this behavior, <code>used</code> symbols that have not
+    been placed in specific sections (e.g. with the <code>section</code>
+    attribute, or the <code>-f{function,data}-sections</code> options) will
+    be placed in new, unique sections.
+    <br>
+    This functionality requires Binutils version 2.36 or later.
+  </li>

Have you considered using <p>...</p> around the three blocks of
text instead of <br> in between?

An open question, it's okay to keep as is if you prefer.

Gerald

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [committed][wwwdocs] gcc-11/changes: "used" attribute saves decls from linker garbage collection
  2020-12-14 23:48 ` Gerald Pfeifer
@ 2020-12-15 11:25   ` Jozef Lawrynowicz
  0 siblings, 0 replies; 3+ messages in thread
From: Jozef Lawrynowicz @ 2020-12-15 11:25 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]

On Tue, Dec 15, 2020 at 12:48:47AM +0100, Gerald Pfeifer wrote:
> On Mon, 7 Dec 2020, Jozef Lawrynowicz wrote:
> > Committed as obvious.
> 
> Thank you!
> 
> +  <li>
> +    For ELF targets that support the GNU or FreeBSD OSABIs, the
> +    <code>used</code> attribute will now save the symbol declaration it is
> +    applied to from linker garbage collection.
> +    <br>
> +    To support this behavior, <code>used</code> symbols that have not
> +    been placed in specific sections (e.g. with the <code>section</code>
> +    attribute, or the <code>-f{function,data}-sections</code> options) will
> +    be placed in new, unique sections.
> +    <br>
> +    This functionality requires Binutils version 2.36 or later.
> +  </li>
> 
> Have you considered using <p>...</p> around the three blocks of
> text instead of <br> in between?
> 
> An open question, it's okay to keep as is if you prefer.

I did try with <p>...</p>, but I thought the additional line spacing
just looked a little out of place amongst all the other lines in this
section, which are list items so have compact line spacing. However,
since they are separate paragraphs there should be some formatting to
show this.

Also, I guess that using <br> to override the house style in this way is
a bit of a no-no, so I will change it to <p>...</p>.

Committed the attached patch.

Thanks,
Jozef

[-- Attachment #2: 0001-gcc-11-changes-Use-p-instead-of-br-for-used-attribut.patch --]
[-- Type: text/plain, Size: 1211 bytes --]

From fb048b7d45422cd869772462cba591a46f1b3b2f Mon Sep 17 00:00:00 2001
From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
Date: Tue, 15 Dec 2020 11:19:41 +0000
Subject: [PATCH] gcc-11/changes: Use <p> instead of <br> for "used" attribute
 description

---
 htdocs/gcc-11/changes.html | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html
index ea9fe93c..1a9e72c1 100644
--- a/htdocs/gcc-11/changes.html
+++ b/htdocs/gcc-11/changes.html
@@ -159,16 +159,20 @@ a work-in-progress.</p>
     </ul>
   </li>
   <li>
+    <p>
     For ELF targets that support the GNU or FreeBSD OSABIs, the
     <code>used</code> attribute will now save the symbol declaration it is
     applied to from linker garbage collection.
-    <br>
+    </p>
+    <p>
     To support this behavior, <code>used</code> symbols that have not
     been placed in specific sections (e.g. with the <code>section</code>
     attribute, or the <code>-f{function,data}-sections</code> options) will
     be placed in new, unique sections.
-    <br>
+    </p>
+    <p>
     This functionality requires Binutils version 2.36 or later.
+    </p>
   </li>
 </ul>
 
-- 
2.29.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-15 11:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07 14:57 [committed][wwwdocs] gcc-11/changes: "used" attribute saves decls from linker garbage collection Jozef Lawrynowicz
2020-12-14 23:48 ` Gerald Pfeifer
2020-12-15 11:25   ` Jozef Lawrynowicz

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).