https://sourceware.org/bugzilla/show_bug.cgi?id=23906
--- Comment #22 from David Ledger <davidledger at live dot com.au> --- Thankyou! Whoops. Was trying to get the data structure built at compile time. Anyway to get it to work within windows, I tried EditBin.exe but it didn’t work. I set the reserve stack to 512Mb. How did you get ld. from GCC9 to work for this target? David Ledger - Electronics Design Engineer Skype: david.j.ledger From: tnfchris at sourceware dot org<mailto:sourceware-bugzi...@sourceware.org> Sent: Thursday, 13 December 2018 3:29 AM To: davidled...@live.com.au<mailto:davidled...@live.com.au> Subject: [Bug ld/23906] LD Bug : Undocumented exit status 253 https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D23906&data=02%7C01%7C%7Cc2f08691526d4db6673908d6604ef4bc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636802289560134947&sdata=D7tZTAXmrosCpuTh9UOS%2BepgSt1G4ohLY0FVy5eZ6Gk%3D&reserved=0 --- Comment #21 from Tamar Christina <tnfchris at sourceware dot org> --- It seems that Nick was right that this hitting the stack limit. The reason it's doing so is that you have a quite a lot of templates in your C++ code. The linker seems to segfault when it's trying to demangle this symbol _ZNSt11_Tuple_implILj0EJN7General6Parser4NodeINS1_7KeywordILj4ELj2EEENS1_6StatesIJNS2_INS3_ILj5ELj3EEENS5_IJNS1_4SCPI3EndINS7_15CommandInternalIRKS4_JNS1_5ParamIfEENS7_5BlankILj0EEEEEEZNS7_7CommandISB which is done in libiberty https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgcc-mirror%2Fgcc%2Fblob%2Fmaster%2Flibiberty%2Fcp-demangle.c%23L4315&data=02%7C01%7C%7Cc2f08691526d4db6673908d6604ef4bc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636802289560134947&sdata=%2BAiATfI%2BMDFzFiSh6FzxQhqepnlGtq280Qk3dAryqbY%3D&reserved=0 This hits two VLAs expanding two structs of 16 bytes. However you have 1485065 entries in dpi.num_copy_templates causing it to push the stack down (dpi.num_saved_scopes + dpi.num_copy_templates) * 16 bytes. Which is 190129824 bytes, or 181mb and so way over blowing your stack limit. I tried with GCC 9 which seems to do a better job with the templates and it works there. But I guess the real fix is to not use those VLAs in libiberty. But I believe that's maintained by GCC if I'm not mistaken. for now, you can work around it by increasing your ulimit. -- You are receiving this mail because: You reported the bug. -- 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