patchelf 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/patchelf/patcher.rb +21 -3
- data/lib/patchelf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1edf0d9c59559ab91a8aa9725a54d70002bc45b805b1186d7c601e042bc2114a
|
4
|
+
data.tar.gz: 8640e0da10909f2552b92bb337d7d777249271c256984ab811e887cff9d86e4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f54378fc9342220fc42cb843b1b2e0312e3bcc99269338526c38c0e3ec9f655c29ac97578d02cbdeb59e92565d60670a6a164f1ffb9dfcb4d6cc1ddfd4c5d13f
|
7
|
+
data.tar.gz: 48fb3d8d3b6eab76d90df2c6850b9d322f38669cb4347ad28b7ce3536ece630289b511fd5585fb2e052e705491352190177a358e79fb13265c73fdfcc02323a6
|
data/lib/patchelf/patcher.rb
CHANGED
@@ -13,6 +13,8 @@ module PatchELF
|
|
13
13
|
# @!macro [new] note_apply
|
14
14
|
# @note This setting will be saved after {#save} being invoked.
|
15
15
|
|
16
|
+
attr_reader :elf # @return [ELFTools::ELFFile] ELF parser object.
|
17
|
+
|
16
18
|
# Instantiate a {Patcher} object.
|
17
19
|
# @param [String] filename
|
18
20
|
# Filename of input ELF.
|
@@ -124,7 +126,23 @@ module PatchELF
|
|
124
126
|
# Get runpath.
|
125
127
|
# @return [String?]
|
126
128
|
def runpath
|
127
|
-
@set[@rpath_sym] || runpath_
|
129
|
+
@set[@rpath_sym] || runpath_(@rpath_sym)
|
130
|
+
end
|
131
|
+
|
132
|
+
# Get rpath
|
133
|
+
# return [String?]
|
134
|
+
def rpath
|
135
|
+
@set[:rpath] || runpath_(:rpath)
|
136
|
+
end
|
137
|
+
|
138
|
+
# Set rpath
|
139
|
+
#
|
140
|
+
# Modify / set DT_RPATH of the given ELF.
|
141
|
+
# similar to runpath= except DT_RPATH is modifed/created in DYNAMIC segment.
|
142
|
+
# @param [String] rpath
|
143
|
+
# @macro note_apply
|
144
|
+
def rpath=(rpath)
|
145
|
+
@set[:rpath] = rpath
|
128
146
|
end
|
129
147
|
|
130
148
|
# Set runpath.
|
@@ -182,8 +200,8 @@ module PatchELF
|
|
182
200
|
end
|
183
201
|
|
184
202
|
# @return [String?]
|
185
|
-
def runpath_
|
186
|
-
tag_name_or_log(
|
203
|
+
def runpath_(rpath_sym = :runpath)
|
204
|
+
tag_name_or_log(rpath_sym, "Entry DT_#{rpath_sym.to_s.upcase} not found.")
|
187
205
|
end
|
188
206
|
|
189
207
|
# @return [String?]
|
data/lib/patchelf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patchelf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- david942j
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: elftools
|