diff options
author | Rich Felker <dalias@aerifal.cx> | 2016-03-06 17:25:52 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2016-03-06 17:25:52 +0000 |
commit | 71392a91c333d47b6b3c8f99c897e3b5a7eb6d58 (patch) | |
tree | 40f77722791adbcb7ec8dc2741a4201ae2219f9a /ldso | |
parent | b023c03b574acdfd73418314a5dcaa83e5cea5a0 (diff) | |
download | musl-71392a91c333d47b6b3c8f99c897e3b5a7eb6d58.tar.gz musl-71392a91c333d47b6b3c8f99c897e3b5a7eb6d58.tar.xz musl-71392a91c333d47b6b3c8f99c897e3b5a7eb6d58.zip |
generalize mips-specific reloc code not to hard-code sym/type encoding
this change is made in preparation for adding the mips64 port, which needs a 64-bit (and mips64-specific) form of the R_INFO macro, but it's a better abstraction anyway. based on part of the mips64 port patch by Mahesh Bodapati and Jaydeep Patil of Imagination Technologies.
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/dynlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ldso/dynlink.c b/ldso/dynlink.c index 87f3b7f8..e458f386 100644 --- a/ldso/dynlink.c +++ b/ldso/dynlink.c @@ -1134,7 +1134,7 @@ static void do_mips_relocs(struct dso *p, size_t *got) Sym *sym = p->syms + j; rel[0] = (unsigned char *)got - base; for (i-=j; i; i--, sym++, rel[0]+=sizeof(size_t)) { - rel[1] = sym-p->syms << 8 | R_MIPS_JUMP_SLOT; + rel[1] = R_INFO(sym-p->syms, R_MIPS_JUMP_SLOT); do_relocs(p, rel, sizeof rel, 2); } } |