Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12452 Discussions

The developer has enough knowledge...?

Altera_Forum
Honored Contributor II
830 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