]> git.droids-corp.org - dpdk.git/commitdiff
build: hide local symbols in shared libraries
authorThomas Monjalon <thomas@monjalon.net>
Sun, 6 Mar 2022 09:20:23 +0000 (10:20 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 8 Mar 2022 14:22:33 +0000 (15:22 +0100)
The symbols which are not listed in the version script
are exported by default.
Adding a local section with a wildcard make non-listed functions
and variables as hidden, as it should be in all version.map files.

These are the changes done in the shared libraries:
- DF .text  Base          auxiliary_add_device
- DF .text  Base          auxiliary_dev_exists
- DF .text  Base          auxiliary_dev_iterate
- DF .text  Base          auxiliary_insert_device
- DF .text  Base          auxiliary_is_ignored_device
- DF .text  Base          auxiliary_match
- DF .text  Base          auxiliary_on_scan
- DF .text  Base          auxiliary_scan
- DO .bss   Base          auxiliary_bus_logtype
- DO .data  Base          auxiliary_bus
- DO .bss   Base          gpu_logtype

There is no impact on regexdev library.

Because these local symbols were exported as non-internal
in DPDK 21.11, any change in these functions would break the ABI.
Exception rules are added for these experimental libraries,
so the ABI check will skip them until the next ABI version.

A check is added to avoid such miss in future.

Fixes: 1afce3086cf4 ("bus/auxiliary: introduce auxiliary bus")
Fixes: 8b8036a66e3d ("gpudev: introduce GPU device class library")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
devtools/check-symbol-maps.sh
devtools/libabigail.abignore
drivers/bus/auxiliary/version.map
lib/gpudev/version.map
lib/regexdev/version.map

index 5bd290ac97171ea9a8745d4b66f2a49667a1ce26..8266fdf9ea423aeef2ce59740d90c8e724174152 100755 (executable)
@@ -53,4 +53,11 @@ if [ -n "$duplicate_symbols" ] ; then
     ret=1
 fi
 
+local_miss_maps=$(grep -L 'local: \*;' $@)
+if [ -n "$local_miss_maps" ] ; then
+    echo "Found maps without local catch-all:"
+    echo "$local_miss_maps"
+    ret=1
+fi
+
 exit $ret
index 18c11c80c65f23298ae7875ed5959c84ce447c69..c618f200320c1391f9dbc4aa44351a6943870406 100644 (file)
 ; Ignore changes in common mlx5 driver, should be all internal
 [suppress_file]
         soname_regexp = ^librte_common_mlx5\.
+
+; Ignore visibility fix of local functions in experimental auxiliary driver
+[suppress_file]
+        soname_regexp = ^librte_bus_auxiliary\.
+
+; Ignore visibility fix of local functions in experimental gpudev library
+[suppress_file]
+        soname_regexp = ^librte_gpudev\.
index a52260657cff8072297118b4a9c2071a865fd8d0..dc993e84ff8d24cf3727e118334750ffcc35993f 100644 (file)
@@ -4,4 +4,6 @@ EXPERIMENTAL {
        # added in 21.08
        rte_auxiliary_register;
        rte_auxiliary_unregister;
+
+       local: *;
 };
index b23e3fd6eb0f513df8a458df95da3de619f3a935..a2c8ce57599b3a3d9434c8ab0f5925d5669a0930 100644 (file)
@@ -39,4 +39,6 @@ INTERNAL {
        rte_gpu_get_by_name;
        rte_gpu_notify;
        rte_gpu_release;
+
+       local: *;
 };
index 988b9096385f5b65a0f35a836896ac8dc5a3e105..3c6e9fffa1f5898cc75df10ba6200dffd96917e1 100644 (file)
@@ -26,6 +26,8 @@ EXPERIMENTAL {
        rte_regexdev_xstats_get;
        rte_regexdev_xstats_names_get;
        rte_regexdev_xstats_reset;
+
+       local: *;
 };
 
 INTERNAL {