linkmap_ios 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 765d0167a550afb8d1af484e0b35879b396058ed
4
- data.tar.gz: 51369cba927ed494ac37ff3754280355e28f096c
3
+ metadata.gz: 2be3cf43715b456d204bf882857f69167bfb3bd9
4
+ data.tar.gz: cc2f5421e132e3b151841996104a7d31cb97efff
5
5
  SHA512:
6
- metadata.gz: f35983a6a86d427496ee491d64bcd201603d0820a002528f6cf27d74a880ff92385b18f377c818e00651aa47255bbb05f1fe7ab8703b3d74bbe503fda8fe87a0
7
- data.tar.gz: d0cb77e99b26cf1c0878b2885b746f6a8be31641b209f17cd92f8c24e8108e2ccf23f9f3853620ea2ef8779a4ffaa0daff29778c6492400772229ca444b66dd8
6
+ metadata.gz: eda4e25efb244e73340ea2d3cec02c26e3aa4267c9bc0f8b5e04b76ff29fc2a5fa449f935017ff5c63b3ceafe52d93a8271bbfbf6d5137c26b0e5784aacd95e7
7
+ data.tar.gz: 51553134c934f36a829e1207fe7f65d662626181c55051993f641da0f4fec7fbcef9288b560bf8b9b7419257f70876358b5a388e033302c09137d02d9d661a24
data/README.md CHANGED
@@ -32,13 +32,18 @@ Parse link map file and output. Will output Ruby Hash by default
32
32
  Byte is the default unit in all kind of output.
33
33
 
34
34
  ## Release Note
35
- ### [0.1.0] 2016-08-09
36
- 1. Finish all base functions
37
- ### [0.1.1] 2017-3-29
35
+ ### [0.1.3] 2018-06-07
36
+ 1. Support .a file
37
+ 2. Minor bugfixs
38
+
39
+ ### [0.1.1] 2017-03-29
38
40
  1. Increase the concurrency, add dead stripped symbol handle in symbol analyze
39
41
  2. Add simple section analyze
40
42
  3. Add uncounted section number in report
41
43
 
44
+ ### [0.1.0] 2016-08-09
45
+ 1. Finish all base functions
46
+
42
47
  ## TODO
43
48
  1. Add test specs
44
49
  2. Add full sections analysis function
@@ -3,12 +3,12 @@ require "filesize"
3
3
  require "json"
4
4
 
5
5
  module LinkmapIos
6
- Library = Struct.new(:name, :size, :objects, :dead_symbol_size)
6
+ Library = Struct.new(:name, :size, :objects, :dead_symbol_size, :pod)
7
7
 
8
8
  class LinkmapParser
9
9
  attr_reader :id_map
10
10
  attr_reader :library_map
11
-
11
+
12
12
  def initialize(file_path)
13
13
  @file_path = file_path
14
14
  @id_map = {}
@@ -23,7 +23,7 @@ module LinkmapIos
23
23
  parse
24
24
 
25
25
  total_size = @library_map.values.map(&:size).inject(:+)
26
- detail = @library_map.values.map { |lib| {:library => lib.name, :size => lib.size, :dead_symbol_size => lib.dead_symbol_size, :objects => lib.objects.map { |o| @id_map[o][:object] }}}
26
+ detail = @library_map.values.map { |lib| {:library => lib.name, :pod => lib.pod, :size => lib.size, :dead_symbol_size => lib.dead_symbol_size, :objects => lib.objects.map { |o| @id_map[o][:object] }}}
27
27
  total_dead_size = @library_map.values.map(&:dead_symbol_size).inject(:+)
28
28
 
29
29
  # puts total_size
@@ -105,6 +105,16 @@ module LinkmapIos
105
105
 
106
106
  library = (@library_map[$2] or Library.new($2, 0, [], 0))
107
107
  library.objects << id
108
+ if text.include?('/Pods/')
109
+ # Sample:
110
+ # 0x108BE58D5 0x000000AD [7167] literal string: /var/folders/80/d5nlb_0d05n7bq58h2fy181h0000gp/T/d20180412-62284-c4qbkv/sandbox.SAKPodSharper-React-0.54.3.2@20180412210546/Pods/React/ReactCommon/jschelpers/JSCHelpers.cpp
111
+ # podname is word after "/Pods/", example:React
112
+ divstr = text.split('/Pods/').last
113
+ podname = divstr.split('/').first
114
+ library.pod = podname
115
+ else
116
+ library.pod = ''
117
+ end
108
118
  @library_map[$2] = library
109
119
  elsif text =~ /\[(.*)\].*\/(.*)/
110
120
  # Sample:
@@ -126,9 +136,10 @@ module LinkmapIos
126
136
  end
127
137
  @id_map[id] = {:library => lib, :object => $2}
128
138
 
129
- library = (@library_map[lib] or Library.new(lib, 0, [], 0))
139
+ library = (@library_map[lib] or Library.new(lib, 0, [], 0, ''))
130
140
  library.objects << id
131
141
  @library_map[lib] = library
142
+
132
143
  elsif text =~ /\[(.*)\]\s*([\w\s]+)/
133
144
  # Sample:
134
145
  # [ 0] linker synthesized
@@ -1,3 +1,3 @@
1
1
  module LinkmapIos
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkmap_ios
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Luo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-30 00:00:00.000000000 Z
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor