http://sourceware.org/bugzilla/show_bug.cgi?id=15025
Bug #: 15025 Summary: --enable-initfini-array creates .init_array where no input has one Product: binutils Version: 2.23 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassig...@sourceware.org ReportedBy: rguent...@suse.de Classification: Unclassified When --enable-initfini-array then the linker script looks like .init_array : { KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) KEEP (*(.init_array)) KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) } which means .init_array is unconditionally generated even if it is not present in any input file (but only .ctors are). That's undesirable because it does not preserve ordering in .ctors. Testcase: class X { public: X() {} }; X x; int main(){} -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils