dxp 113 January 23, 2017 Posted January 23, 2017 · Report post Да там это все safety проверки. Не помню там таких проверок. Код функции: /* * Copyright © 2004 CodeSourcery, LLC * * Permission to use, copy, modify, and distribute this file * for any purpose is hereby granted without fee, provided that * the above copyright notice and this notice appears in all * copies. * * This file is distributed WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /* Handle ELF .{pre_init,init,fini}_array sections. */ #include <sys/types.h> #ifdef HAVE_INITFINI_ARRAY /* These magic symbols are provided by the linker. */ extern void (*__preinit_array_start []) (void) __attribute__((weak)); extern void (*__preinit_array_end []) (void) __attribute__((weak)); extern void (*__init_array_start []) (void) __attribute__((weak)); extern void (*__init_array_end []) (void) __attribute__((weak)); extern void _init (void); /* Iterate over all the init routines. */ void __libc_init_array (void) { size_t count; size_t i; count = __preinit_array_end - __preinit_array_start; for (i = 0; i < count; i++) __preinit_array_start[i] (); _init (); count = __init_array_end - __init_array_start; for (i = 0; i < count; i++) __init_array_start[i] (); } #endif На данном этапе проекта если их все закомментировать ничего не изменится. Попробую ___libc_init_array ибо ни один из бряков в конструкторах не сработал снова. А если отладчиком это место по шагам пройти и посмотреть, вызываются ли конструкторы? И если нет, то почему. Если в линкерном скрипте символы (секций) указаны правильно, то не работать, вроде, нечему. Quote Share this post Link to post Share on other sites More sharing options...
AHTOXA 22 January 23, 2017 Posted January 23, 2017 · Report post Да там это все safety проверки. На данном этапе проекта если их все закомментировать ничего не изменится. Попробую ___libc_init_array ибо ни один из бряков в конструкторах не сработал снова. По-моему, у вас снова неправильно. Было extern uint32 __ctors_start, __ctors_end; , потом вы исправили на extern void(* const __ctors_start)(); extern void(* const __ctors_end)(); От этого ничего не поменялось. Либо берите адрес, как я советовал, либо объявите их как массивы, как это сделано у Сергея. Quote Share this post Link to post Share on other sites More sharing options...
Legath 0 March 16, 2017 Posted March 16, 2017 (edited) · Report post Все оказалось намного проще. порт arm7 полность подходит для cortex-r4 , за исключение плавучки, но это решается дефайнами. Работает. Но есть одна неприятность, работает только первый процесс , при попытке передачи управления процессу 2 возникает ошибка как в самом начале, sp для второго процесса указывает далеко. сейчас занимаюсь с этим. Edited March 16, 2017 by Legath Quote Share this post Link to post Share on other sites More sharing options...