Fellows, I want to remap start-up configuration. So, I'm thinking of breaking down in parts some start-up procedures and adding c++ constructors/destructors. In order to do that I think I will add some sections like '.init0' ... '.init3' and '.fini0' ... '.fini3' put appropriate code there. In details: - .init0 will contain copy data section loop - .init1 will contain clear bss loop - .init2 will contain c++ constructors code and linked as appropriate - .init3 jump to main only: 'br #main'
- .fini0 will contain _nothing_ .. just a label __stop_ProcExec_ - .fini1 will contail c++ destructors linked as necessary - .fini2 will contain an old __stop_ProcExec_ and new label to loop at like .Llabel: mov r15, r2 jmp .Llabel - .fini3 will contain ... something. Also, two sections have to be introduced - .ctors and .dtors The overal elf sections map will look as: .text: .init0 .init1 .init2 .init3 ... user code as in .text.* .fini0 .fini1 .fini2 .fini3 .ctors .dtors .data .noinit's data (still in doubt if .noinit may contain initialized data) .vectors: .bss: .bss .noinit .all the user stuff Any suggestions? Comments? Additions? etc.? I hope to implement it in gcc-3.3 (hopefully) and above and current binutils. cheers, ~d -- /******************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44 _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 3468202, 5585314 ********************************************************************/