2014-02-28 03:20:44 +00:00
|
|
|
#if __BYTE_ORDER == __BIG_ENDIAN
|
|
|
|
#define ENDIAN_SUFFIX "eb"
|
2013-10-05 10:13:18 +00:00
|
|
|
#else
|
|
|
|
#define ENDIAN_SUFFIX ""
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define LDSO_ARCH "sh" ENDIAN_SUFFIX
|
|
|
|
|
2014-06-18 06:44:02 +00:00
|
|
|
#define TPOFF_K 8
|
2013-10-05 10:13:18 +00:00
|
|
|
|
2014-06-18 06:44:02 +00:00
|
|
|
static int remap_rel(int type)
|
2013-10-05 10:13:18 +00:00
|
|
|
{
|
|
|
|
switch(type) {
|
2014-06-18 06:44:02 +00:00
|
|
|
case R_SH_DIR32:
|
|
|
|
return REL_SYMBOLIC;
|
|
|
|
case R_SH_REL32:
|
|
|
|
return REL_OFFSET;
|
2013-10-05 10:13:18 +00:00
|
|
|
case R_SH_GLOB_DAT:
|
2014-06-18 06:44:02 +00:00
|
|
|
return REL_GOT;
|
2013-10-05 10:13:18 +00:00
|
|
|
case R_SH_JMP_SLOT:
|
2014-06-18 06:44:02 +00:00
|
|
|
return REL_PLT;
|
2013-10-05 10:13:18 +00:00
|
|
|
case R_SH_RELATIVE:
|
2014-06-18 06:44:02 +00:00
|
|
|
return REL_RELATIVE;
|
2013-10-05 10:13:18 +00:00
|
|
|
case R_SH_COPY:
|
2014-06-18 06:44:02 +00:00
|
|
|
return REL_COPY;
|
2013-10-05 10:13:18 +00:00
|
|
|
case R_SH_TLS_DTPMOD32:
|
2014-06-18 06:44:02 +00:00
|
|
|
return REL_DTPMOD;
|
2013-10-05 10:13:18 +00:00
|
|
|
case R_SH_TLS_DTPOFF32:
|
2014-06-18 06:44:02 +00:00
|
|
|
return REL_DTPOFF;
|
2013-10-05 10:13:18 +00:00
|
|
|
case R_SH_TLS_TPOFF32:
|
2014-06-18 06:44:02 +00:00
|
|
|
return REL_TPOFF;
|
2013-10-05 10:13:18 +00:00
|
|
|
}
|
2014-06-16 07:09:07 +00:00
|
|
|
return 0;
|
2013-10-05 10:13:18 +00:00
|
|
|
}
|