X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=arch%2Fmips%2Freloc.h;h=4c035f3276cc97f540b928b0da353851b5fa4347;hb=9448b0513e2eec020fbca9c10412b83df5027a16;hp=785489ed1077ec860e670aadb4836e16c7678f87;hpb=9c74856af78ac3e8aaa5f8b560e5022d2e6037d1;p=musl diff --git a/arch/mips/reloc.h b/arch/mips/reloc.h index 785489ed..4c035f32 100644 --- a/arch/mips/reloc.h +++ b/arch/mips/reloc.h @@ -1,7 +1,14 @@ #include #include +#include -#define ETC_LDSO_PATH "/etc/ld-musl-mips.path" +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define ENDIAN_SUFFIX "el" +#else +#define ENDIAN_SUFFIX "" +#endif + +#define LDSO_ARCH "mips" ENDIAN_SUFFIX #define IS_COPY(x) ((x)==R_MIPS_COPY) #define IS_PLT(x) 1 @@ -23,6 +30,17 @@ static inline void do_single_reloc( case R_MIPS_COPY: memcpy(reloc_addr, (void *)sym_val, sym_size); break; + case R_MIPS_TLS_DTPMOD32: + *reloc_addr = def.dso ? def.dso->tls_id : self->tls_id; + break; + case R_MIPS_TLS_DTPREL32: + *reloc_addr += def.sym->st_value; + break; + case R_MIPS_TLS_TPREL32: + *reloc_addr += def.sym + ? def.sym->st_value + def.dso->tls_offset - 0x7000 + : self->tls_offset - 0x7000; + break; } }