|
From: | rguenther at suse dot de |
Subject: | [Bug ld/15025] New: --enable-initfini-array creates .init_array where no input has one |
Date: | Thu, 17 Jan 2013 13:54:50 +0000 |
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: address@hidden ReportedBy: address@hidden 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.
[Prev in Thread] | Current Thread | [Next in Thread] |