hhvm/systemlib-extractor

Name: systemlib-extractor

Owner: HipHop Virtual Machine

Description: Extracts Hack/HNI files embedded in the HHVM executable

Created: 2015-08-12 21:58:47.0

Updated: 2018-05-03 22:45:13.0

Pushed: 2018-05-03 22:45:12.0

Homepage: null

Size: 32

Language: Hack

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Systemlib Extractor Build Status

Parts of HHVM are implemented in Hack, and are embedded in the HHVM binary as additional ELF PROGDATA sections. This library extracts them from the binary.

There are two kinds of sections that this library extracts:

Sections with different names or aren't PROGDATA can not be examined with this library.

Requirements

This package requires the readelf binary; on Debian-like systems, this is in the elfutils package.

Installation

Assuming your project uses Composer:

composer require hhvm/systemlib-extractor
Usage
d> require('vendor/autoload.php')
ire('vendor/autoload.php')
d> $extractor = new HHVM\SystemlibExtractor\SystemlibExtractor()
ractor = new HHVM\SystemlibExtractor\SystemlibExtractor()
d> =$extractor->getSectionNames()
tractor->getSectionNames()
ector Object

[0] => "ext.6eedc03a68a6"
[1] => "ext.a0e7b2a56511"
[2] => "ext.7c82e855b041"

[119] => "ext.a6be8a33b7c9"
[120] => "systemlib"


d> =$extractor->getSectionContents('systemlib')
tractor->getSectionContents('systemlib')
h\n// {@}generated\n\nnamespace {\n\n// default base\nclass stdClass {\n}\n\n// used in unserialize() for unknown classes\nclass __PHP_Incomplete_Class {\n  public \$__PHP_Incomplete_Class_Name;\n
e are more characters. Continue? [y/N]n

d>

The constructor accepts two optional parameters:

License

Systemlib-Extractor is BSD-licensed. We also provide an additional patent grant.

Contributing

Please see CONTRIBUTING.md


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.