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 @@ -66,16 +66,22 @@ var findLinkReferences = function (bytecode) {
66
66
// trim trailing underscores
67
67
// NOTE: this has no way of knowing if the trailing underscore was part of the name
68
68
var libraryName = found [ 1 ] . replace ( / _ + $ / gm, '' ) ;
69
+ var fileName = libraryName ;
70
+ var nameExtraction = / ( .* ) : ( .* ) / . exec ( libraryName ) ;
71
+ if ( nameExtraction ) {
72
+ fileName = nameExtraction [ 1 ] ;
73
+ libraryName = nameExtraction [ 2 ] ;
74
+ }
69
75
70
- if ( ! linkReferences [ libraryName ] ) {
71
- linkReferences [ libraryName ] = [ ] ;
76
+ if ( ! linkReferences [ fileName ] ) {
77
+ linkReferences [ fileName ] = { } ;
72
78
}
73
79
74
- linkReferences [ libraryName ] . push ( {
80
+ linkReferences [ fileName ] [ libraryName ] = {
75
81
// offsets are in bytes in binary representation (and not hex)
76
82
start : ( offset + start ) / 2 ,
77
83
length : 20
78
- } ) ;
84
+ } ;
79
85
80
86
offset += start + 20 ;
81
87
You can’t perform that action at this time.
0 commit comments