diff options
author | Aurelien Jarno <aurel32@debian.org> | 2016-10-23 22:42:25 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-10-24 12:14:42 -0700 |
commit | caa1ef6318a88e7da95c9909619a94f812cda9e5 (patch) | |
tree | 24155b4479f2162f4fa78d69b5c42530f536f31c | |
parent | 63aaa3aa52f14929a5c8795fce68f4aa5c9c7094 (diff) | |
download | meson-caa1ef6318a88e7da95c9909619a94f812cda9e5.zip meson-caa1ef6318a88e7da95c9909619a94f812cda9e5.tar.gz meson-caa1ef6318a88e7da95c9909619a94f812cda9e5.tar.bz2 |
Fix depfixer on MIPS.
-rw-r--r-- | authors.txt | 1 | ||||
-rwxr-xr-x | mesonbuild/scripts/depfixer.py | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/authors.txt b/authors.txt index 0222ff6..5931481 100644 --- a/authors.txt +++ b/authors.txt @@ -52,3 +52,4 @@ Scott D Phillips Gautier Pelloux-Prayer Alexandre Foley Jouni Kosonen +Aurelien Jarno diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py index 7124c6f..34fb2f7 100755 --- a/mesonbuild/scripts/depfixer.py +++ b/mesonbuild/scripts/depfixer.py @@ -23,6 +23,7 @@ DT_RPATH = 15 DT_RUNPATH = 29 DT_STRTAB = 5 DT_SONAME = 14 +DT_MIPS_RLD_MAP_REL = 1879048245 class DataSizes(): def __init__(self, ptrsize, is_le): @@ -307,6 +308,11 @@ class Elf(DataSizes): rpentry.d_tag = 0 self.dynamic = self.dynamic[:i] + self.dynamic[i+1:] + [rpentry] break; + # DT_MIPS_RLD_MAP_REL is relative to the offset of the tag. Adjust it consequently. + for entry in self.dynamic[i:]: + if entry.d_tag == DT_MIPS_RLD_MAP_REL: + entry.val += 2 * (self.ptrsize // 8) + break self.bf.seek(sec.sh_offset) for entry in self.dynamic: entry.write(self.bf) |