[PATCH] D26130: [ELF] - Implemented --symbol-ordering-file option.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 7 01:47:35 PST 2016
grimar added a comment.
In https://reviews.llvm.org/D26130#587774, @davide wrote:
> If lld mislinks firefox, we shouldn't silently ignore it and try to link with gold, but open a bug instead (and/or try to fix).
I think it is just an issue of their build system.
I found similar issues: https://bugzilla.mozilla.org/show_bug.cgi?id=1080654, https://bugzilla.mozilla.org/show_bug.cgi?id=1063359
widget/gtk/mozgtk/gtk3/moz.build has next lines:
no_as_needed = ['-Wl,--no-as-needed1']
as_needed = ['-Wl,--as-needed']
no_as_needed = 
as_needed = 
If I change the last two to have -Wl..., then build works fine for me.
Comment at: test/ELF/symbol-ordering-file.s:9
+# BEFORE: Contents of section .text:
+# BEFORE-NEXT: 11000 11223344 55
> grimar wrote:
> > rafael wrote:
> > > Changing .text to .foo should make this easier to read as .foo doesn't have an implicit alignment.
> > linker does not concatinate .foo into single section like .text.* :(
> > So I had to use .text
> Can't you just use multiple input files with two `.foo` sections?
I think reasonable minimum to show that sorting is performed according to order file is
at least 3 sections. So that would be main test file + 2 input files.
I find testcases that use additional inputs harder to read generally, so actually I would prefer current way
when testcase is just a two files in total.
My test has 5 sections what also allows to check spaces before/after symbol in ordering file,
doing that with .foo and multiple inputs would require 4 input files I think.
More information about the llvm-commits