cxl/lib: remove unimplemented symbol cxl_mapping_get_region
[email protected]
maintainerPATCH 1/1 cxl/lib: remove unimplemented symbol cxl_mapping_get_region
From: Alison Schofield <[email protected]>
User reports this symbol was added but has never had an implementation causing their linker ld.lld to fail like so:
ld.lld: error: version script assignment of 'LIBCXL_3' to symbol 'cxl_mapping_get_region' failed: symbol not defined
This likely worked for some builds but not others because of different toolchains (linkers), compiler optimizations (garbage collection), or linker flags (ignoring or only warning on unused symbols).
Clean this up by removing the symbol.
Reposted here from github pull request:
https://github.com/pmem/ndctl/pull/267/
--- cxl/lib/libcxl.sym | 1 - cxl/libcxl.h | 1 - 2 files changed, 2 deletions(-)
cxl/lib/libcxl.sym +0 -1
@@ -208,7 +208,6 @@ global: cxl_mapping_get_first; cxl_mapping_get_next; cxl_mapping_get_decoder; - cxl_mapping_get_region; cxl_mapping_get_position; cxl_decoder_get_by_name; cxl_decoder_get_memdev;
cxl/libcxl.h +0 -1
@@ -354,7 +354,6 @@ struct cxl_memdev_mapping *cxl_mapping_get_first(struct cxl_region *region);struct cxl_memdev_mapping *cxl_mapping_get_next (struct cxl_memdev_mapping *mapping);struct cxl_decoder *cxl_mapping_get_decoder (struct cxl_memdev_mapping *mapping); -struct cxl_region *cxl_mapping_get_region (struct cxl_memdev_mapping *mapping);unsigned int cxl_mapping_get_position (struct cxl_memdev_mapping *mapping);#define cxl_mapping_foreach (region, mapping) \
Signature · 1 line
2.37.3
Quoted 11 lines · On Fri, Feb 14, 2025 at 06:13:16PM -0800, [email protected] wrote:
From: Alison Schofield <[email protected]>
User reports this symbol was added but has never had an implementation causing their linker ld.lld to fail like so:
ld.lld: error: version script assignment of '
LIBCXL_3' to symbol 'cxl_mapping_get_region' failed: symbol not definedThis likely worked for some builds but not others because of different toolchains (linkers), compiler optimizations (garbage collection), or linker flags (ignoring or only warning on unused symbols).
Quoted 6 lines
Clean this up by removing the symbol.
Reposted here from github pull request:
https://github.com/pmem/ndctl/pull/267/Signed-off-by Alison Schofield <[email protected]>
Quoted 32 lines
--- cxl/lib/libcxl.sym | 1 - cxl/libcxl.h | 1 - 2 files changed, 2 deletions(-)cxl/lib/libcxl.sym +0
-1@@ -208,7 +208,6 @@ global: cxl_mapping_get_first; cxl_mapping_get_next; cxl_mapping_get_decoder; - cxl_mapping_get_region; cxl_mapping_get_position; cxl_decoder_get_by_name; cxl_decoder_get_memdev;cxl/libcxl.h +0
-1@@ -354,7 +354,6 @@ struct cxl_memdev_mapping *cxl_mapping_get_first(struct cxl_region *region);struct cxl_memdev_mapping *cxl_mapping_get_next (struct cxl_memdev_mapping *mapping);struct cxl_decoder *cxl_mapping_get_decoder (struct cxl_memdev_mapping *mapping); -struct cxl_region *cxl_mapping_get_region (struct cxl_memdev_mapping *mapping);unsigned int cxl_mapping_get_position (struct cxl_memdev_mapping *mapping);#define cxl_mapping_foreach (region, mapping) \Signature · 1 line
2.37.3