Skip to content

use --dynamic-list for exporting executable symbols#143446

Merged
bors merged 1 commit intorust-lang:masterfrom
usamoi:export-executable-symbols
Jul 10, 2025
Merged

use --dynamic-list for exporting executable symbols#143446
bors merged 1 commit intorust-lang:masterfrom
usamoi:export-executable-symbols

Conversation

@usamoi
Copy link
Contributor

@usamoi usamoi commented Jul 4, 2025

closes #101610
cc #84161

https://sourceware.org/binutils/docs-2.39/ld/VERSION.html:

--dynamic-list=dynamic-list-file
Specify the name of a dynamic list file to the linker. This is typically used when creating shared libraries to specify a list of global symbols whose references shouldn’t be bound to the definition within the shared library, or creating dynamically linked executables to specify a list of symbols which should be added to the symbol table in the executable. This option is only meaningful on ELF platforms which support shared libraries.

ld.lld --help:

--dynamic-list=: Similar to --export-dynamic-symbol-list. When creating a shared object, this additionally implies -Bsymbolic but does not set DF_SYMBOLIC

--export-dynamic-symbol-list=file: Read a list of dynamic symbol patterns. Apply --export-dynamic-symbol on each pattern

--export-dynamic-symbol=glob: (executable) Put matched symbols in the dynamic symbol table. (shared object) References to matched non-local STV_DEFAULT symbols shouldn't be bound to definitions within the shared object. Does not imply -Bsymbolic.

--export-dynamic: Put symbols in the dynamic symbol table

Use --dynamic-list because it's older than --export-dynamic-symbol-list (binutils 2.35)

try-job: dist-i586-gnu-i586-i686-musl

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-Zexport-executable-symbols alone does not export symbols

6 participants