[llvm] r336838 - gold: Add ability to toggle function/data sections

Bill Wendling via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 11 14:53:07 PDT 2018


Okay. Though the patch is not likely to change.

-bw

On Wed, Jul 11, 2018 at 2:45 PM Peter Collingbourne <peter at pcc.me.uk> wrote:

> I'm sorry that the review is taking a while, but I think it's important
> for this problem to be solved correctly, otherwise it creates a maintenance
> burden on the LTO developers. I am writing a reply to your review, but in
> the meantime can you please revert?
>
> Peter
>
> On Wed, Jul 11, 2018 at 2:35 PM, Bill Wendling <isanbard at gmail.com> wrote:
>
>> I don't like infinite reviews. Please either approve or reject the review
>> that I sent out.
>>
>> On Wed, Jul 11, 2018 at 12:28 PM Peter Collingbourne <peter at pcc.me.uk>
>> wrote:
>>
>>> This was also committed after being sent for review but without being
>>> approved, which goes against policy. Please revert.
>>>
>>> Peter
>>>
>>> On Wed, Jul 11, 2018 at 12:20 PM, Roman Lebedev via llvm-commits <
>>> llvm-commits at lists.llvm.org> wrote:
>>>
>>>> Test?
>>>>
>>>> On Wed, Jul 11, 2018 at 10:13 PM, Bill Wendling via llvm-commits
>>>> <llvm-commits at lists.llvm.org> wrote:
>>>> > Author: void
>>>> > Date: Wed Jul 11 12:13:26 2018
>>>> > New Revision: 336838
>>>> >
>>>> > URL: http://llvm.org/viewvc/llvm-project?rev=336838&view=rev
>>>> > Log:
>>>> > gold: Add ability to toggle function/data sections
>>>> >
>>>> > Some programs (e.g. Linux) aren't able to handle function/data
>>>> sections when
>>>> > LTO is used. Thus they need a way to disable it. That can be done
>>>> with these
>>>> > plugin options:
>>>> >
>>>> >     -plugin-opt=-function-sections=0
>>>> >     -plugin-opt=-data-sections=0
>>>> >
>>>> > Modified:
>>>> >     llvm/trunk/tools/gold/gold-plugin.cpp
>>>> >
>>>> > Modified: llvm/trunk/tools/gold/gold-plugin.cpp
>>>> > URL:
>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=336838&r1=336837&r2=336838&view=diff
>>>> >
>>>> ==============================================================================
>>>> > --- llvm/trunk/tools/gold/gold-plugin.cpp (original)
>>>> > +++ llvm/trunk/tools/gold/gold-plugin.cpp Wed Jul 11 12:13:26 2018
>>>> > @@ -834,9 +834,11 @@ static std::unique_ptr<LTO> createLTO(In
>>>> >    // FIXME: Check the gold version or add a new option to enable
>>>> them.
>>>> >    Conf.Options.RelaxELFRelocations = false;
>>>> >
>>>> > -  // Enable function/data sections by default.
>>>> > -  Conf.Options.FunctionSections = true;
>>>> > -  Conf.Options.DataSections = true;
>>>> > +  // Toggle function/data sections.
>>>> > +  if (FunctionSections.getNumOccurrences() == 0)
>>>> > +    Conf.Options.FunctionSections = true;
>>>> > +  if (DataSections.getNumOccurrences() == 0)
>>>> > +    Conf.Options.DataSections = true;
>>>> >
>>>> >    Conf.MAttrs = MAttrs;
>>>> >    Conf.RelocModel = RelocationModel;
>>>> >
>>>> >
>>>> > _______________________________________________
>>>> > llvm-commits mailing list
>>>> > llvm-commits at lists.llvm.org
>>>> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at lists.llvm.org
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Peter
>>>
>>
>
>
> --
> --
> Peter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180711/976cbb5c/attachment.html>


More information about the llvm-commits mailing list