Bug 280170
| Summary: | [GTK][WPE] check-for-invalid-symbols-in-version-script wrongly matches hidden symbols | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Adrian Perez <aperez> |
| Component: | Tools / Tests | Assignee: | Adrian Perez <aperez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Adrian Perez
The Tools/Scripts/check-for-invalid-symbols-in-version-script tool uses
“objcopy -t -C” to gather the list of symbols in an ELF object, which
lists all kind of symbols -- including hidden ones, e.g.:
% objdump -t -C build-wpe/lib/libWPEWebKit-2.0.so.2
00000000017235d0 l F .text 0000000000000001 .hidden IPC::ArgumentCoder<WebCore::Font, void>::encodePlatformData(IPC::Encoder&, WebCore::Font const&)
00000000017235e0 l F .text 0000000000000008 .hidden IPC::ArgumentCoder<WebCore::Font, void>::decodePlatformData(IPC::Decoder&)
...
0000000001641ade l O .rodata.str1.1 000000000000003b .L__PRETTY_FUNCTION__.webkit_web_view_new
...
0000000001c249f0 g F .text 0000000000000060 webkit_web_view_new
...
%
The program does not do any attempt at parsing the output from objdump,
and it just matches strings against its whole output text. Which means it
will match all kinds of symbols, including hidden ones.
The script is basically doing nothing useful, and it should be checking
only the visible symbols from the ELF dynamic section. A much more convenient
way of obtaining the list of such symbols would be using e.g. “nm -jUCD”.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Adrian Perez
Pull request: https://github.com/WebKit/WebKit/pull/34073
EWS
Committed 284063@main (dda1d973f908): <https://commits.webkit.org/284063@main>
Reviewed commits have been landed. Closing PR #34073 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/136484765>