Skip to content

Conversation

@kaniini
Copy link
Contributor

@kaniini kaniini commented Jul 21, 2023

When building with -Wl,-z,now, all symbols must be resolved at link time, as lazy binding is disabled. This provides better performance and also provides protections when combined with -z relro against segments being overwritten at runtime.

However, there is a bug in the GNUTLS build, where the p11-kit symbols are not linked by the pkg-config file normally, allowing the dependency to be resolved through lazy binding instead. Fix this by adding a Requires relationship on the p11-kit package in the pkg-config file.

Fixes: proxysql failure to rebuild from source

cc @mattmoor

When building with -Wl,-z,now, all symbols must be resolved at link time, as lazy
binding is disabled.  This provides better performance and also provides protections
when combined with -z relro against segments being overwritten at runtime.

However, there is a bug in the GNUTLS build, where the p11-kit symbols are not
linked by the pkg-config file normally, allowing the dependency to be resolved
through lazy binding instead.  Fix this by adding a Requires relationship on the
p11-kit package in the pkg-config file.

Signed-off-by: Ariadne Conill <[email protected]>
@kaniini kaniini requested a review from a team as a code owner July 21, 2023 22:06
@kaniini kaniini requested review from joshrwolf and luhring July 21, 2023 22:06
@kaniini kaniini enabled auto-merge July 21, 2023 22:07
@github-actions
Copy link
Contributor

Package gnutls-doc: Click to expand/collapse

Package gnutls-doc:
Unchanged

Package gnutls-dev: Click to expand/collapse

Package gnutls-dev:
Modified: /usr/lib/pkgconfig/gnutls.pc

Package gnutls-utils: Click to expand/collapse

Package gnutls-utils:
Unchanged

Package gnutls-c++: Click to expand/collapse

Package gnutls-c++:
Unchanged

Package gnutls: Click to expand/collapse

Package gnutls:
Modified: /usr/lib/libgnutls.so.30.34.2

@kaniini kaniini added this pull request to the merge queue Jul 21, 2023
Merged via the queue into main with commit 733a6e0 Jul 21, 2023
@kaniini kaniini deleted the fix/gnutls-underlinking branch July 21, 2023 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants