[lld] r250771 - [ELF2] Introduce support for -z nodelete.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 22:10:32 PDT 2015


On Mon, Oct 19, 2015 at 10:08 PM, Davide Italiano <davide at freebsd.org> wrote:
> On Mon, Oct 19, 2015 at 7:57 PM, Rui Ueyama <ruiu at google.com> wrote:
>> On Mon, Oct 19, 2015 at 5:20 PM, Davide Italiano via llvm-commits
>> <llvm-commits at lists.llvm.org> wrote:
>>>
>>> Author: davide
>>> Date: Mon Oct 19 19:20:20 2015
>>> New Revision: 250771
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=250771&view=rev
>>> Log:
>>> [ELF2] Introduce support for -z nodelete.
>>>
>>>
>>> Modified:
>>>     lld/trunk/ELF/Config.h
>>>     lld/trunk/ELF/Driver.cpp
>>>     lld/trunk/ELF/OutputSections.cpp
>>>     lld/trunk/test/elf2/dt_flags.s
>>>
>>> Modified: lld/trunk/ELF/Config.h
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.h?rev=250771&r1=250770&r2=250771&view=diff
>>>
>>> ==============================================================================
>>> --- lld/trunk/ELF/Config.h (original)
>>> +++ lld/trunk/ELF/Config.h Mon Oct 19 19:20:20 2015
>>> @@ -57,6 +57,7 @@ struct Configuration {
>>>    bool Shared;
>>>    bool Static = false;
>>>    bool Verbose;
>>> +  bool ZNodelete = false;
>>>    bool ZNow = false;
>>>    ELFKind EKind = ELFNoneKind;
>>>    uint16_t EMachine = llvm::ELF::EM_NONE;
>>>
>>> Modified: lld/trunk/ELF/Driver.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=250771&r1=250770&r2=250771&view=diff
>>>
>>> ==============================================================================
>>> --- lld/trunk/ELF/Driver.cpp (original)
>>> +++ lld/trunk/ELF/Driver.cpp Mon Oct 19 19:20:20 2015
>>> @@ -158,9 +158,13 @@ void LinkerDriver::createFiles(opt::Inpu
>>>    for (auto *Arg : Args.filtered(OPT_undefined))
>>>      Config->Undefined.push_back(Arg->getValue());
>>>
>>> -  for (auto *Arg : Args.filtered(OPT_z))
>>> -    if (Arg->getValue() == StringRef("now"))
>>> +  // FIXME: Group -z options together in Config.
>>
>>
>> Does this FIXME make sense? To me, -z is a random collection of features
>> that happen to be for some reason in -z featurename form, so I don't see a
>> strong reason to group them specially.
>>
>
> hmm, probably you're right on this. I actually am  a little bit
> annoyed by the fact that we need a ton of bools for -z in Config and I
> hoped we could probably find a way to express that in a more synthetic
> way. Maybe there is no such way, at least not easily. In any case,
> I'll remove the FIXME for
> now. Thanks for pointing out!
>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare

r250800. Thanks again.

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list