Skip to content

macOS: Fix linking statically#2649

Open
madsmtm wants to merge 1 commit intojemalloc:devfrom
madsmtm:patch-1
Open

macOS: Fix linking statically#2649
madsmtm wants to merge 1 commit intojemalloc:devfrom
madsmtm:patch-1

Conversation

@madsmtm
Copy link
Copy Markdown

@madsmtm madsmtm commented May 15, 2024

__attribute__((constructor)) does not mark the symbol as used, so the linker ends up dead-stripping the symbol when linked statically.

Adding the used attribute fixes that.

Fixes #708.

`__attribute__((constructor))` does not mark the symbol as used, so the linker ends up dead-stripping the symbol when linked statically.

Adding the `used` attribute fixes that.
@madsmtm
Copy link
Copy Markdown
Author

madsmtm commented Dec 15, 2024

I have become aware that this is not enough to fix the problem, see tikv/jemallocator#109.

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.

OSX: linker omits zone.o when statically linking jemalloc

1 participant