[21/22] libctf: Remove undefined functions from ver. map

Message ID 20240417202018.34966-22-nick.alcock@oracle.com
State New
Headers
Series more modifiable CTF dicts (and a few bugfixes) |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Testing passed

Commit Message

Nick Alcock April 17, 2024, 8:20 p.m. UTC
  From: Nicholas Vinson <nvinson234@gmail.com>

Starting with ld.lld-17, ld.lld is invoked with the option
--no-undefined-version enabled by default. Furthermore, The functions
ctf_label_set() and ctf_label_get() are not defined. Their inclusion in
libctf/libctf.ver causes ld.lld-17 to fail emitting the following error
messages:

ld.lld: error: version script assignment of 'LIBCTF_1.0' to symbol 'ctf_label_set' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBCTF_1.0' to symbol 'ctf_label_get' failed: symbol not defined

This patch fixes the issue by removing the symbol names from
libctf/libctf.ver.

[nca: fused in later commit that marked ctf_arc_open as libctf
      only as well.  Added ChangeLog entry.]

Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>

libctf/
	* libctf.ver: drop nonexistent label functions: mark
	ctf_arc_open as libctf-only.
---
 libctf/libctf.ver | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
  

Patch

diff --git a/libctf/libctf.ver b/libctf/libctf.ver
index c59847d012b..6e7345be66b 100644
--- a/libctf/libctf.ver
+++ b/libctf/libctf.ver
@@ -80,9 +80,6 @@  LIBCTF_1.0 {
 	ctf_enum_name;
 	ctf_enum_value;
 
-	ctf_label_set;
-	ctf_label_get;
-
 	ctf_label_topmost;
 	ctf_label_info;
 
@@ -139,7 +136,6 @@  LIBCTF_1.0 {
 
 	ctf_arc_write;
 	ctf_arc_write_fd;
-	ctf_arc_open;
 	ctf_arc_bufopen;
 	ctf_arc_close;
 	ctf_arc_open_by_name;
@@ -167,6 +163,7 @@  LIBCTF_1.0 {
 
 	ctf_fdopen;                             /* libctf only.  */
 	ctf_open;                               /* libctf only.  */
+	ctf_arc_open;                           /* libctf only.  */
 	ctf_bfdopen;                            /* libctf only.  */
 	ctf_bfdopen_ctfsect;                    /* libctf only.  */
     local: