Bug 248986 - [JSC] Avoid maintaining a list of hidden stdlib symbols
Summary: [JSC] Avoid maintaining a list of hidden stdlib symbols
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Elliott Williams
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-08 15:50 PST by Elliott Williams
Modified: 2023-05-26 18:20 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elliott Williams 2022-12-08 15:50:54 PST
We manually maintain a list of symbols to hide from JavaScriptCore in OTHER_LDFLAGS_HIDE_SYMBOLS, which (as I understand it) prevents us from inadvertently exporting weak symbols for C++ standard library operator instantiations. This is a bit of annoying maintenance, as the symbols we need to hide may change arbitrarily with toolchain updates (recently: https://github.com/WebKit/WebKit/pull/6060, https://github.com/WebKit/WebKit/pull/7352). Can we do anything to avoid the maintenance?

One idea is to have a build step that analyzes object files as they are compiled and produces a list of weak stdlib symbols, which can then be passed to the linker via -unexported_symbols_list.
Comment 1 Radar WebKit Bug Importer 2022-12-08 15:51:12 PST
<rdar://problem/103150469>
Comment 2 Elliott Williams 2023-04-21 13:59:10 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13049
Comment 3 Elliott Williams 2023-05-26 18:20:59 PDT
This commit message got rewritten during landing, so it’s confusingly named, but the code has indeed landed in https://commits.webkit.org/263507@main.