summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-03-06 17:25:52 +0000
committerRich Felker <dalias@aerifal.cx>2016-03-06 17:25:52 +0000
commit71392a91c333d47b6b3c8f99c897e3b5a7eb6d58 (patch)
tree40f77722791adbcb7ec8dc2741a4201ae2219f9a /src
parentb023c03b574acdfd73418314a5dcaa83e5cea5a0 (diff)
downloadmusl-71392a91c333d47b6b3c8f99c897e3b5a7eb6d58.tar.gz
musl-71392a91c333d47b6b3c8f99c897e3b5a7eb6d58.tar.bz2
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 'src')
-rw-r--r--src/internal/dynlink.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/internal/dynlink.h b/src/internal/dynlink.h
index 48890b2d..5717627a 100644
--- a/src/internal/dynlink.h
+++ b/src/internal/dynlink.h
@@ -11,12 +11,14 @@ typedef Elf32_Phdr Phdr;
typedef Elf32_Sym Sym;
#define R_TYPE(x) ((x)&255)
#define R_SYM(x) ((x)>>8)
+#define R_INFO ELF32_R_INFO
#else
typedef Elf64_Ehdr Ehdr;
typedef Elf64_Phdr Phdr;
typedef Elf64_Sym Sym;
#define R_TYPE(x) ((x)&0x7fffffff)
#define R_SYM(x) ((x)>>32)
+#define R_INFO ELF64_R_INFO
#endif
/* These enum constants provide unmatchable default values for