https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99759
Bug ID: 99759 Summary: morestack.S should support .init_array.0 besides .ctors.65535 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- to drop reliance on ld's default linker script .init_array : { PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) PROVIDE_HIDDEN (__init_array_end = .); } The input section description is quite close but does not sort .init_array.* and .ctors.* with the same priority together.