Elf32_Word *plt; Elf32_Word index;
Elf32_Word *plt, *data_words; Elf32_Word index, offset, num_plt_entries;  num_plt_entries = (map->l_info[DT_PLTRELSZ]->d_un.d_val / sizeof(Elf32_Rela)); plt = (Elf32_Word *) map->l_info[DT_PLTGOT]->d_un.d_val; offset = reloc_addr - plt; index = (offset - PLT_INITIAL_ENTRY_WORDS)/2; data_words = plt + PLT_DATA_START_WORDS (num_plt_entries);
__elf_machine_fixup_plt(struct link_map *map, const Elf32_Rela *reloc,			Elf32_Addr *reloc_addr, Elf32_Addr finaladdr){  Elf32_Sword delta = finaladdr - (Elf32_Word) (char *) reloc_addr;  if (delta << 6 >> 6 == delta)    *reloc_addr = OPCODE_B (delta);  else if (finaladdr <= 0x01fffffc || finaladdr >= 0xfe000000)    *reloc_addr = OPCODE_BA (finaladdr);  else    {      Elf32_Word *plt;      Elf32_Word index;      plt = (Elf32_Word *) map->l_info[DT_PLTGOT]->d_un.d_val;      index = (reloc_addr - plt - PLT_INITIAL_ENTRY_WORDS)/2;      if (index >= PLT_DOUBLE_SIZE)	{	  /* Slots greater than or equal to 2^13 have 4 words available	     instead of two.  */	  /* FIXME: There are some possible race conditions in this code,	     when called from 'fixup'.	     1) Suppose that a lazy PLT entry is executing, a context switch	     between threads (or a signal) occurs, and the new thread or	     signal handler calls the same lazy PLT entry.  Then the PLT entry	     would be changed while it's being run, which will cause a segfault	     (almost always).	     2) Suppose the reverse: that a lazy PLT entry is being updated,	     a context switch occurs, and the new code calls the lazy PLT	     entry that is being updated.  Then the half-fixed PLT entry will	     be executed, which will also almost always cause a segfault.	     These problems don't happen with the 2-word entries, because	     only one of the two instructions are changed when a lazy entry	     is retargeted at the actual PLT entry; the li instruction stays	     the same (we have to update it anyway, because we might not be	     updating a lazy PLT entry).  */	  reloc_addr[0] = OPCODE_LI (11, finaladdr);	  reloc_addr[1] = OPCODE_ADDIS (11, 11, (finaladdr + 0x8000) >> 16);	  reloc_addr[2] = OPCODE_MTCTR (11);	  reloc_addr[3] = OPCODE_BCTR ();	}      else	{	  Elf32_Word num_plt_entries;	  num_plt_entries = (map->l_info[DT_PLTRELSZ]->d_un.d_val			     / sizeof(Elf32_Rela));	  plt[index+PLT_DATA_START_WORDS (num_plt_entries)] = finaladdr;	  reloc_addr[0] = OPCODE_LI (11, index*4);	  reloc_addr[1] = OPCODE_B (-(4*(index*2					 + 1					 - PLT_LONGBRANCH_ENTRY_WORDS					 + PLT_INITIAL_ENTRY_WORDS)));	  reloc_addr += 1;  /* This is the modified address.  */	}    }  MODIFIED_CODE (reloc_addr);}