File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -70,16 +70,22 @@ var findLinkReferences = function (bytecode) {
70
70
// trim trailing underscores
71
71
// NOTE: this has no way of knowing if the trailing underscore was part of the name
72
72
var libraryName = found [ 1 ] . replace ( / _ + $ / gm, '' ) ;
73
+ var fileName = libraryName ;
74
+ var nameExtraction = / ( .* ) : ( .* ) / . exec ( libraryName ) ;
75
+ if ( nameExtraction ) {
76
+ fileName = nameExtraction [ 1 ] ;
77
+ libraryName = nameExtraction [ 2 ] ;
78
+ }
73
79
74
- if ( ! linkReferences [ libraryName ] ) {
75
- linkReferences [ libraryName ] = [ ] ;
80
+ if ( ! linkReferences [ fileName ] ) {
81
+ linkReferences [ fileName ] = { } ;
76
82
}
77
83
78
- linkReferences [ libraryName ] . push ( {
84
+ linkReferences [ fileName ] [ libraryName ] = {
79
85
// offsets are in bytes in binary representation (and not hex)
80
86
start : ( offset + start ) / 2 ,
81
87
length : 20
82
- } ) ;
88
+ } ;
83
89
84
90
offset += start + 20 ;
85
91
You can’t perform that action at this time.
0 commit comments