https://sourceware.org/bugzilla/show_bug.cgi?id=22831
--- Comment #22 from Luke Kenneth Casson Leighton <lkcl at lkcl dot net> --- Created attachment 11522 --> https://sourceware.org/bugzilla/attachment.cgi?id=11522&action=edit repro test case attached is a test file that can generate a Makefile and associated header and c files that will easily exceed the capacity of a 64-bit system to cope with. here are arguments to the script that will cause GNU ld to attempt to create an EIGHTEEN GIGABYTE executable. $ python evil_linker_torture.py 3000 400 200 500000 a 32-bit system will be completely unable to cope with this, as it hopelessly exceeds the 4GB resident limit by 450%. when compiled on a 64-bit system it was necessary to terminate it with prejudice, as by the time it got to 9.5GB resident memory it was in danger of putting the compile host into severe and irrecoverable swap thrashing. if the Makefile is modified to include the option "-Wl,--no-keep-memory", the following output is generated and the errors result in the link phase terminating unsuccessfully. ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000 ld: src9.o: in function `fn_9_0': /home/lkcl/src/ld_torture/src9.c:3006:(.text+0x27): relocation truncated to fit: R_X86_64_PLT32 against symbol `fn_1149_322' defined in .text section in src1149.o ld: /home/lkcl/src/ld_torture/src9.c:3008:(.text+0x41): relocation truncated to fit: R_X86_64_PLT32 against symbol `fn_1387_379' defined in .text section in src1387.o ld: /home/lkcl/src/ld_torture/src9.c:3014:(.text+0x8f): relocation truncated to fit: R_X86_64_PLT32 against symbol `fn_1821_295' defined in .text section in src1821.o ld: /home/lkcl/src/ld_torture/src9.c:3015:(.text+0x9c): relocation truncated to fit: R_X86_64_PLT32 against symbol `fn_1082_189' defined in .text section in src1082.o ld: /home/lkcl/src/ld_torture/src9.c:3016:(.text+0xa9): relocation truncated to fit: R_X86_64_PLT32 against symbol `fn_183_330' defined in .text section in src183.o ld: /home/lkcl/src/ld_torture/src9.c:3024:(.text+0x111): relocation truncated to fit: R_X86_64_PLT32 against symbol `fn_162_394' defined in .text section in src162.o ld: /home/lkcl/src/ld_torture/src9.c:3026:(.text+0x12b): relocation truncated to fit: R_X86_64_PLT32 against symbol `fn_132_235' defined in .text section in src132.o ld: /home/lkcl/src/ld_torture/src9.c:3028:(.text+0x145): relocation truncated to fit: R_X86_64_PLT32 against symbol `fn_1528_316' defined in .text section in src1528.o ld: /home/lkcl/src/ld_torture/src9.c:3029:(.text+0x152): relocation truncated to fit: R_X86_64_PLT32 against symbol `fn_1178_357' defined in .text section in src1178.o ld: /home/lkcl/src/ld_torture/src9.c:3031:(.text+0x16c): relocation truncated to fit: R_X86_64_PLT32 against symbol `fn_1180_278' defined in .text section in src1180.o ld: /home/lkcl/src/ld_torture/src9.c:3035:(.text+0x1a0): additional relocation overflows omitted from the output ^Cmake: *** Deleting file `main' make: *** [main] Interrupt -- 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