Rev 158 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 158 | Rev 159 | ||
---|---|---|---|
Line 94... | Line 94... | ||
94 | if (sym>symtab_section->data_offset/sizeof(Elf32_Sym)) |
94 | if (sym>symtab_section->data_offset/sizeof(Elf32_Sym)) |
95 | continue; |
95 | continue; |
96 | Elf32_Sym* esym = ((Elf32_Sym *)symtab_section->data)+sym; |
96 | Elf32_Sym* esym = ((Elf32_Sym *)symtab_section->data)+sym; |
97 | int sect=esym->st_shndx; |
97 | int sect=esym->st_shndx; |
98 | ss=findsection(me,sect); |
98 | ss=findsection(me,sect); |
99 | if (ss==0) continue; |
99 | if (ss==0) |
- | 100 | ss=me->bss_sections; |
|
100 | if (rel->r_offset>s->data_size) |
101 | if (rel->r_offset>s->data_size) |
101 | continue; |
102 | continue; |
102 | if (type==R_386_PC32) |
103 | if (type==R_386_PC32) |
103 | *(int*)(rel->r_offset+s->data)+=ss->sh_addr+esym->st_value-rel->r_offset-s->sh_addr; |
104 | *(int*)(rel->r_offset+s->data)=ss->sh_addr+esym->st_value-rel->r_offset-s->sh_addr-4; |
104 | else if (type==R_386_32) |
105 | else if (type==R_386_32) |
105 | *(int*)(rel->r_offset+s->data)+=ss->sh_addr+esym->st_value; |
106 | *(int*)(rel->r_offset+s->data)+=ss->sh_addr+esym->st_value; |
106 | } |
107 | } |
107 | rel=rel_; |
108 | rel=rel_; |
108 | s=s->next; |
109 | s=s->next; |