public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] Mark __libc_freeres_fn as used [BZ #27002]
@ 2020-12-16 12:40 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2020-12-16 12:40 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3c1fe20a9f4f6e12a3677ca8a5921ac03976da3b
commit 3c1fe20a9f4f6e12a3677ca8a5921ac03976da3b
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Dec 2 14:26:28 2020 -0800
Mark __libc_freeres_fn as used [BZ #27002]
GCC 11 with
commit 6fbec038f7a7ddf29f074943611b53210d17c40c
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Feb 3 11:55:43 2020 -0800
Use SHF_GNU_RETAIN to preserve symbol definitions
places used symbols in SECTION_RETAIN sections if assembler supports it.
Mark __libc_freeres_fn as used to avoid
gconv_dl.c: In function 'free_mem':
gconv_dl.c:191:1: error: 'do_release_all' without 'used' attribute and 'free_mem' with 'used' attribute are placed in a section with the same name [-Werror=attributes]
191 | do_release_all (void *nodep)
| ^~~~~~~~~~~~~~
In file included from <command-line>:
gconv_dl.c:202:18: note: 'free_mem' was declared here
202 | libc_freeres_fn (free_mem)
| ^~~~~~~~
./../include/libc-symbols.h:316:15: note: in definition of macro 'libc_freeres_fn'
316 | static void name (void)
| ^~~~
cc1: all warnings being treated as errors
Diff:
---
include/libc-symbols.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 154a73b5e5..f06ce3053a 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -307,7 +307,7 @@ for linking")
/* Resource freeing functions from libc.so go in this section. */
#define __libc_freeres_fn_section \
- __attribute__ ((section ("__libc_freeres_fn")))
+ __attribute__ ((__used__, section ("__libc_freeres_fn")))
/* Resource freeing functions for libc.so. */
#define libc_freeres_fn(name) \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-16 12:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 12:40 [glibc] Mark __libc_freeres_fn as used [BZ #27002] H.J. Lu
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).