[Webkit-unassigned] [Bug 280170] New: [GTK][WPE] check-for-invalid-symbols-in-version-script wrongly matches hidden symbols

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 23 00:59:55 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=280170

            Bug ID: 280170
           Summary: [GTK][WPE]
                    check-for-invalid-symbols-in-version-script wrongly
                    matches hidden symbols
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aperez at igalia.com

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”.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240923/77290c92/attachment-0001.htm>


More information about the webkit-unassigned mailing list