From: Pedro Alves Date: Thu, 16 Jan 2020 18:35:30 +0000 (+0000) Subject: Ensure proc-service symbols have default visibility (PR build/24805) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=790f17188a22e722bab9915e1d50307f8cb7c0f9;p=binutils-gdb.git Ensure proc-service symbols have default visibility (PR build/24805) Compiling GDB with '-fvisibility=hidden' removes the symbols that should be exported. This patch explicitly marks them as visible. gdb/ChangeLog: 2020-01-16 Pedro Alves Norbert Lange PR build/24805 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New. (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs) (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue) (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread) (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs) (ps_plog): Redeclare exported functions with default visibility. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5513bea8182..fe8972e47f0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +2020-01-16 Pedro Alves + Norbert Lange + + PR build/24805 + * gdbsupport/gdb_proc_service.h (PS_EXPORT): New. + (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs) + (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue) + (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread) + (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs) + (ps_plog): Redeclare exported functions with default visibility. + 2020-01-16 Nitika Achra * dwarf2loc.c (decode_debug_loclists_addresses): Handle diff --git a/gdbsupport/gdb_proc_service.h b/gdbsupport/gdb_proc_service.h index 3ce2ee80fa9..9872ab2bca4 100644 --- a/gdbsupport/gdb_proc_service.h +++ b/gdbsupport/gdb_proc_service.h @@ -170,4 +170,33 @@ EXTERN_C_POP #endif /* HAVE_PROC_SERVICE_H */ +/* Make sure we export the needed symbols, in case GDB is built with + -fvisibility=hidden. */ + +#define PS_EXPORT(SYM) \ + __attribute__((visibility ("default"))) typeof (SYM) SYM + +PS_EXPORT (ps_get_thread_area); +PS_EXPORT (ps_getpid); +PS_EXPORT (ps_lcontinue); +PS_EXPORT (ps_lgetfpregs); +PS_EXPORT (ps_lgetregs); +PS_EXPORT (ps_lsetfpregs); +PS_EXPORT (ps_lsetregs); +PS_EXPORT (ps_lstop); +PS_EXPORT (ps_pcontinue); +PS_EXPORT (ps_pdread); +PS_EXPORT (ps_pdwrite); +PS_EXPORT (ps_pglobal_lookup); +PS_EXPORT (ps_pstop); +PS_EXPORT (ps_ptread); +PS_EXPORT (ps_ptwrite); + +#ifdef __sun__ +PS_EXPORT (ps_lgetxregs); +PS_EXPORT (ps_lgetxregsize); +PS_EXPORT (ps_lsetxregs); +PS_EXPORT (ps_plog); +#endif + #endif /* COMMON_GDB_PROC_SERVICE_H */