diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2004-11-02 08:14:49 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2004-11-02 08:14:49 +0000 |
commit | dc0f822bfed430e5b4f87f27c2e63171fa5fba28 (patch) | |
tree | 01eda5fa3c42d0c8b114f76622b4794a7735aa41 /ldso/ldso/mips/dl-startup.h | |
parent | f8f7b102217864ea382a46bb9ad173b3493e5cae (diff) |
- Remove dynamic_size from struct elf_resolve.
- Replace all open coded dynamic handling with a function. Reduces size.
- Fold special MIPS dynamic code into the dynamic_info item.
- Add RELRO support.
- Support linking with "-z now".
- prepare for DT_RELACOUNT/DT_RELCOUNT optimization.
- Add -z now to ld.so linking, this is what ld.so does anyway so
let the linker know that.
Diffstat (limited to 'ldso/ldso/mips/dl-startup.h')
-rw-r--r-- | ldso/ldso/mips/dl-startup.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ldso/ldso/mips/dl-startup.h b/ldso/ldso/mips/dl-startup.h index 3d9b829c3..0dd92b5ba 100644 --- a/ldso/ldso/mips/dl-startup.h +++ b/ldso/ldso/mips/dl-startup.h @@ -48,21 +48,21 @@ asm("" \ * Here is a macro to perform the GOT relocation. This is only * used when bootstrapping the dynamic loader. */ -#define PERFORM_BOOTSTRAP_GOT(got) \ +#define PERFORM_BOOTSTRAP_GOT(got, tpnt) \ do { \ Elf32_Sym *sym; \ unsigned long i; \ \ /* Add load address displacement to all local GOT entries */ \ i = 2; \ - while (i < tpnt->mips_local_gotno) \ + while (i < tpnt->dynamic_info[DT_MIPS_LOCAL_GOTNO_IDX]) \ got[i++] += load_addr; \ \ /* Handle global GOT entries */ \ - got += tpnt->mips_local_gotno; \ + got += tpnt->dynamic_info[DT_MIPS_LOCAL_GOTNO_IDX]; \ sym = (Elf32_Sym *) (tpnt->dynamic_info[DT_SYMTAB] + \ - load_addr) + tpnt->mips_gotsym; \ - i = tpnt->mips_symtabno - tpnt->mips_gotsym; \ + load_addr) + tpnt->dynamic_info[DT_MIPS_GOTSYM_IDX]; \ + i = tpnt->dynamic_info[DT_MIPS_SYMTABNO_IDX] - tpnt->dynamic_info[DT_MIPS_GOTSYM_IDX];\ \ while (i--) { \ if (sym->st_shndx == SHN_UNDEF || \ @@ -91,8 +91,8 @@ do { \ #define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \ switch(ELF32_R_TYPE((RELP)->r_info)) { \ case R_MIPS_REL32: \ - if (symtab_index) { \ - if (symtab_index < tpnt->mips_gotsym) \ + if (SYMTAB) { \ + if (symtab_index<tpnt->dynamic_info[DT_MIPS_GOTSYM_IDX])\ *REL += SYMBOL; \ } \ else { \ |