From: Norbert Lange <nolange79@gmail.com>
To: gdb-patches@sourceware.org
Cc: Norbert Lange <nolange79@gmail.com>
Subject: [PATCH] always export the symbols for the proc_service interface
Date: Sat, 04 Jan 2020 20:20:00 -0000 [thread overview]
Message-ID: <20200104202004.83439-2-nolange79@gmail.com> (raw)
In-Reply-To: <20200104202004.83439-1-nolange79@gmail.com>
Compiling GDB with '-fvisibility=hidden' will remove the
symbols that should be exported.
This patch explicitly marks them as visible.
gdb/ChangeLog
PR build/24805
* gdbsupport/gdb_proc_service.h: push/pop visibility
attribute for exported functions.
---
gdb/gdbsupport/gdb_proc_service.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/gdb/gdbsupport/gdb_proc_service.h b/gdb/gdbsupport/gdb_proc_service.h
index 8565da3286..72abb5c1c0 100644
--- a/gdb/gdbsupport/gdb_proc_service.h
+++ b/gdb/gdbsupport/gdb_proc_service.h
@@ -23,6 +23,11 @@
#ifdef HAVE_PROC_SERVICE_H
+/* ensure the symbols are public, even if the default is hidden */
+#if __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
+
/* glibc's proc_service.h doesn't wrap itself with extern "C". Need
to do it ourselves. */
EXTERN_C_PUSH
@@ -31,6 +36,10 @@ EXTERN_C_PUSH
EXTERN_C_POP
+#if __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
+
#else /* HAVE_PROC_SERVICE_H */
/* The following fallback definitions have been imported and adjusted
@@ -69,6 +78,10 @@ EXTERN_C_POP
# endif
#endif
+#if __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
+
EXTERN_C_PUSH
/* Functions in this interface return one of these status codes. */
@@ -168,6 +181,10 @@ extern void ps_plog (const char *fmt, ...);
EXTERN_C_POP
+#if __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
+
#endif /* HAVE_PROC_SERVICE_H */
#endif /* COMMON_GDB_PROC_SERVICE_H */
--
2.24.1
next prev parent reply other threads:[~2020-01-04 20:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-04 20:20 [PATCH][PR build/24805] Explicitly export symbols from gdb_proc_service Norbert Lange
2020-01-04 20:20 ` Norbert Lange [this message]
2020-01-06 16:07 ` [PATCH] always export the symbols for the proc_service interface Tom Tromey
2020-01-06 23:22 ` Norbert Lange
2020-01-06 19:21 ` [PATCH][PR build/24805] Explicitly export symbols from gdb_proc_service Pedro Alves
2020-01-06 23:39 ` Norbert Lange
2020-01-14 15:47 ` Pedro Alves
2020-01-14 16:28 ` Pedro Alves
2020-01-14 16:57 ` Norbert Lange
2020-01-16 19:56 ` Pedro Alves
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=20200104202004.83439-2-nolange79@gmail.com \
--to=nolange79@gmail.com \
--cc=gdb-patches@sourceware.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