Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
705 Views

The developer has enough knowledge...?

Hi, 

 

How does this guy reach the top of 'PLTresolver' if the PLT entries are more than 2729? 

 

/* PLT implementation for position-independent code. */ 

static const bfd_vma nios2_so_plt_entry[] = { /* .PLTn */ 

0x03c00034, /* movhi r15, %hiadj(index * 4) */ 

0x7bc00004, /* addi r15, r15, %lo(index * 4) */ 

0x00000006 /* br .PLTresolve */ 

}; 

 

static const bfd_vma nios2_so_plt0_entry[] = { /* .PLTresolve */ 

0x001ce03a, /* nextpc r14 */ 

0x03400034, /* movhi r13, %hiadj(_GLOBAL_OFFSET_TABLE_) */ 

0x6b9b883a, /* add r13, r13, r14 */ 

0x6b800017, /* ldw r14, %lo(_GLOBAL_OFFSET_TABLE_+4)(r13) */ 

0x6b400017, /* ldw r13, %lo(_GLOBAL_OFFSET_TABLE_+8)(r13) */ 

0x6800683a /* jmp r13 */ 

}; 

 

The instruction 'br' can only do the indirect jump within 16 bits. 

 

Kazu
0 Kudos
0 Replies