Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
All support for Intel NUC 7 - 13 systems has transitioned to ASUS. Read latest update.
12578 Discussions

The developer has enough knowledge...?

Altera_Forum
Honored Contributor II
1,034 Views

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
Reply