<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>280170</bug_id>
          
          <creation_ts>2024-09-23 00:59:55 -0700</creation_ts>
          <short_desc>[GTK][WPE]  check-for-invalid-symbols-in-version-script wrongly matches hidden symbols</short_desc>
          <delta_ts>2024-09-23 01:45:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2062259</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2024-09-23 00:59:55 -0700</bug_when>
    <thetext>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&lt;WebCore::Font, void&gt;::encodePlatformData(IPC::Encoder&amp;, WebCore::Font const&amp;)
  00000000017235e0 l     F .text  0000000000000008              .hidden IPC::ArgumentCoder&lt;WebCore::Font, void&gt;::decodePlatformData(IPC::Decoder&amp;)
  ...
  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”.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062260</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2024-09-23 01:04:24 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/34073</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062263</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-09-23 01:44:04 -0700</bug_when>
    <thetext>Committed 284063@main (dda1d973f908): &lt;https://commits.webkit.org/284063@main&gt;

Reviewed commits have been landed. Closing PR #34073 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062264</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-09-23 01:45:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/136484765&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>