Date: Tue, 28 Apr 2015 11:35:18 +0300 (MSK) From: Alexander Monakov <amonakov@...ras.ru> To: Andre McCurdy <armccurdy@...il.com> cc: musl@...ts.openwall.com Subject: Re: [PATCH] force LTO to be disabled when compiling dlstart.lo Hello, Sorry for not joining the discussion earlier. Andre, can you specify your GCC and Binutils version? The reason I ask, with modern toolchain you shouldn't be seeing the error you reported. The fact that _dlstart_c function is used from assembly should have been communicated from the linker to the compiler via the "linker plugin". If linker plugin was not used, that would explan the problem. Can you also check if adding '-fuse-linker-plugin' to '-flto' works for you? For reference, with GCC 4.9 that uses linker plugin for LTO automatically, I get the following diagnostics: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: /tmp/ccxxkwJ8.ltrans0.ltrans.o: requires dynamic R_X86_64_PC32 reloc against '_dlstart_c' which may overflow at runtime; recompile with -fPIC /tmp/ccxxkwJ8.ltrans0.ltrans.o(.text+0x12): error: undefined reference to '_dlstart_c' Not saying the patch can't go in -- just want to make sure everyone on the same page regarding the origin of the problem and GCC LTO capabilities. Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.