Skip to content

MDEV-40832 Export mariadb services as ELF versioned ABI - #5572

Draft
grooverdan wants to merge 1 commit into
MariaDB:11.4from
grooverdan:MDEV-40832
Draft

MDEV-40832 Export mariadb services as ELF versioned ABI#5572
grooverdan wants to merge 1 commit into
MariaDB:11.4from
grooverdan:MDEV-40832

Conversation

@grooverdan

Copy link
Copy Markdown
Member

Move service versioning from include/service_versions.h to cmake/mariadb_services.cmake. For ELF capable environments produce a version script, so that the MariaDB exported services are versioned.

The include headers include the .symver so they have the right UND symbol and the server can move to providing updated implementations of services.

$ nm -D --with-symbol-versions sql/mariadbd | grep @@MARIADB
00000000021c2840 D base64_service@@MARIADB_base64_1.0
00000000021c2860 D encryption_scheme_service@@MARIADB_encryption_scheme_1.0
00000000021c2848 D encryption_service@@MARIADB_encryption_3.0
00000000021c2cf8 D json_service@@MARIADB_json_1.0
00000000021c28a0 D logger_service@@MARIADB_logger_1.0
00000000021c28e0 D my_crypt_service@@MARIADB_my_crypt_1.0
00000000021c2918 D my_md5_service@@MARIADB_my_md5_1.0
00000000021c2938 D my_print_error_service@@MARIADB_my_print_error_1.0
00000000021c2970 D my_sha1_service@@MARIADB_my_sha1_1.1
00000000021c2a38 D my_sha2_service@@MARIADB_my_sha2_1.0
00000000021c2a50 D my_snprintf_service@@MARIADB_my_snprintf_1.0
00000000021c2d20 D print_check_msg_service@@MARIADB_print_check_msg_1.0
00000000021c2a80 D progress_report_service@@MARIADB_progress_report_1.0
00000000021c2730 D sql_service_handler@@MARIADB_sql_service_1.2
00000000021c2ab8 D thd_alloc_service@@MARIADB_thd_alloc_2.0
00000000021c2ac8 D thd_autoinc_service@@MARIADB_thd_autoinc_1.0
00000000021c2af8 D thd_error_context_service@@MARIADB_thd_error_context_2.0
00000000021c2808 D thd_kill_statement_service@@MARIADB_kill_statement_16.0
00000000021c2d10 D thd_mdl_service@@MARIADB_thd_mdl_1.0
00000000021c2b10 D thd_rnd_service@@MARIADB_thd_rnd_1.0
00000000021c2b38 D thd_specifics_service@@MARIADB_thd_specifics_1.0
00000000021c2b50 D thd_timezone_service@@MARIADB_thd_timezone_1.0
00000000021c2b68 D thd_wait_service@@MARIADB_thd_wait_1.0
00000000021c2cc0 D wsrep_service@@MARIADB_wsrep_5.0

$ nm -D --with-symbol-versions sql/mariadbd | grep provider_service
00000000021c27e8 D provider_service_bzip2_static
00000000021c27f8 D provider_service_lz4_static
00000000021c27d8 D provider_service_lzma_static
00000000021c27e0 D provider_service_lzo_static
00000000021c27f0 D provider_service_snappy_static

So compression providers not correct yet.

Main services are versioned.

We could still use a dlvsym in plugin to resolve the server side. And if we are embracing gnuisms there's using dlmopen to open the plugin and the dlvsym in their own Lmid_t,

Move service versioning from include/service_versions.h
to cmake/mariadb_services.cmake. For ELF capable environments
produce a version script, so that the MariaDB exported
services are versioned.

Co-authored-by: ChatGPT GPT-5.6 Luna <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant