Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 28 Apr 2015 11:35:18 +0300 (MSK)
From: Alexander Monakov <>
To: Andre McCurdy <>
Subject: Re: [PATCH] force LTO to be disabled when compiling


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:

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

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.


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.