Created attachment 514253 [details] build/unix/elfhack/test.o A build with both LTO and elfhack fails at /home/espindola/tmpfs/objdir-lto-clang/build/unix/elfhack/elfhack -b test.so test.so: No gain. Aborting
Turns out it's the same problem as the other bug
I have to retract, it looks like it's different. If I remove the relro section, it still says No gain.
Ah, this is an interesting case where test.so is too optimized and doesn't exhibit the patterns that are expected to show up from the source... In the present case, there are no relocations...
Created attachment 514296 [details] [diff] [review] Avoid elfhack failure with llvm There are two different things mixed in this patch, but they are two one-liners: - the rule to build the dummy binary works for gcc but not for clang because of missing flags - the test library is over-optimized by clang/gold, and ends up not containing most of the code from test.c, making the testcase not contain what we expect it to. Forcing to build at the lowest optimization level avoids surprises.
Comment on attachment 514296 [details] [diff] [review] Avoid elfhack failure with llvm See comment 6. No risk.
Comment on attachment 514296 [details] [diff] [review] Avoid elfhack failure with llvm if this causes so much as a blip on the tinderbox radar, it comes out until after 4.