I asked this question @ https://forums.xilinx.com/t5/Embedded-Development-Tools/Invoking-C-constuctors-before-main/td-p/1121717 but so far no answers, so see if any one knows the answer here.
The issue is __init is not loading the CTORS table to invoke global constructors.
__init function is in crti.S, but I cannot find the file in the source, here is the disassembly, does not look it tries and load a point and jump to the CTORS table.
Question
tcmichals
I asked this question @ https://forums.xilinx.com/t5/Embedded-Development-Tools/Invoking-C-constuctors-before-main/td-p/1121717 but so far no answers, so see if any one knows the answer here.
The issue is __init is not loading the CTORS table to invoke global constructors.
__init function is in crti.S, but I cannot find the file in the source, here is the disassembly, does not look it tries and load a point and jump to the CTORS table.
__init:
0000abbc: addik r1 , r1 , -16
0000abc0: sw r15, r0 , r1
0000abc4: addik r11, r0 , -1
0000abc8: mts rSHR, r11
0000abcc: addik r11, r0 , 0
0000abd0: mts rSLR, r11
0000abd4: lw r15, r0 , r1
0000abd8: rtsd r15, 8
0000abdc: addik r1 , r1 , 16
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.