[Webkit-unassigned] [Bug 219485] [JSC] Bundle non-native libs in run-jsc-stress-tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 7 04:19:12 PST 2020


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

Adrian Perez <aperez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aperez at igalia.com

--- Comment #9 from Adrian Perez <aperez at igalia.com> ---
Comment on attachment 415409
  --> https://bugs.webkit.org/attachment.cgi?id=415409
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=415409&action=review

> Tools/Scripts/generate-bundle:122
> +    def __init__(self, configuration, platform, bundle_type, syslibs, ldd, should_strip_objects, compression_type, destination = None, revision = None, builder_name = None):

We could avoid needing to pass by hand some alternative “ldd” tool
by always using ”readelf”, which works for any ELF file (no matter
the target architecture) and does not try to run any code. That
would make this “ldd” parameter to the BundleCreator unnecessary.

Something like this gets you the list of shared objects needed:

   readelf -Wd <file> | \
     awk '$2 == "(NEEDED)" { print substr($5, 2, length($5)-2) }'

The output will only include direct dependencies of “<file>”, so one
needs to run the same command recursively on each listed object, until
no more objects are added to the set. I have some shell script around
that does just that and also takes into account the DT_RUNPATH entries
from the ELF dynamic section—let me know if you are interested and I
can share it.

-- 
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/20201207/fb127aa7/attachment.htm>


More information about the webkit-unassigned mailing list