case R_PPC64_PLT16_HA:
gote=got+sym->st_size-1;
*gote=s+a;
+ massert(toc);
store_val(where,MASK(16),ha((ul)gote-toc->st_value));
break;
case R_PPC64_PLT16_LO_DS:
gote=got+sym->st_size-1;
*gote=s+a;
+ massert(toc);
store_val(where,MASK(16),lo((ul)gote-toc->st_value));/*>>2*/
break;
case R_PPC64_PLTSEQ:
case R_PPC64_PLTCALL:
break;
case R_PPC64_TOC16_HA:
+ massert(toc);
store_val(where,MASK(16),ha(s+a-toc->st_value));
break;
case R_PPC64_TOC16_LO_DS:
+ massert(toc);
store_val(where,MASK(16),lo(s+a-toc->st_value));/*>>2*/
break;
case R_PPC64_REL16_LO:
store_val(where,MASK(16),lo(s+a-p));
break;
case R_PPC64_TOC16_LO:
+ massert(toc);
store_val(where,MASK(16),lo(s+a-toc->st_value));
break;
case R_PPC64_ADDR64:
store_val(where,~0L,(s+a));
break;
case R_PPC64_TOC:
+ massert(toc);
store_val(where,~0L,toc->st_value);
break;
case R_PPC64_REL32:
Shdr *sec;
Sym *sym;
- massert(sec=get_section(".toc",sec1,sece,sn));
-
- for (sym=sym1;sym<syme;sym++) {
+ for (toc=NULL,sym=sym1;sym<syme;sym++) {
const char *s=st1+sym->st_name;
if (!strcmp(s,".TOC.") || !strcmp(s,".toc.")) {
toc=sym;
toc->st_info=ELF_ST_INFO(STB_LOCAL,ELF_ST_TYPE(sym->st_info));
+ massert((sec=get_section(".bss",sec1,sece,sn)));
toc->st_shndx=sec-sec1;
}
}