Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix installation of statically linked executable for ELF binary. #1240

Merged
merged 1 commit into from
Dec 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions authors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ Paulo Antonio Alvarez
Olexa Bilaniuk
Daniel Stone
Marc-Antoine Perennou
Matthieu Gautier
7 changes: 7 additions & 0 deletions mesonbuild/scripts/depfixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ def find_section(self, target_name):
def parse_dynamic(self):
sec = self.find_section(b'.dynamic')
self.dynamic = []
if sec is None:
return
self.bf.seek(sec.sh_offset)
while True:
e = DynamicEntry(self.bf, self.ptrsize, self.is_le)
Expand All @@ -218,6 +220,9 @@ def print_soname(self):
soname = i
if i.d_tag == DT_STRTAB:
strtab = i
else:
print("This file does not have a soname")
return
self.bf.seek(strtab.val + soname.val)
print(self.read_str())

Expand Down Expand Up @@ -300,6 +305,8 @@ def fix_rpathtype_entry(self, new_rpath, entrynum):

def remove_rpath_entry(self, entrynum):
sec = self.find_section(b'.dynamic')
if sec is None:
return None
for (i, entry) in enumerate(self.dynamic):
if entry.d_tag == entrynum:
rpentry = self.dynamic[i]
Expand Down