This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

__attribute__((constructor(<prio>))) creating inconsistent sections


Version: 5.2.0
Target: m68k-elf
Host: darwin

I’m attempting to resolve some boot order dependency issues on a bare metal target using  __attribute__((constructor)). It appears that it and init_priority should take care of all my issues, but I need to get them to play nicely with the linker as well. The problem that I’m having is that sometimes the compiler will generate sections along the line of ‘.ctors.<65535-prio>’ and other times it will simply use ‘.ctors'. The main issue with the the second form is that it carries no priority information for use in the link step. 

I figure that it’s related to whether or not there’s other constructors called for the compilation unit that lack priority configurations, but I cannot rely on that for the application.

Does anyone have an idea to point me in the right direction with?

Thanks,
-Dan



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]