[lld] r293276 - [ELF] Bypass section type check

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 10:45:55 PST 2017


Eugene Leviant via llvm-commits <llvm-commits at lists.llvm.org> writes:

> Author: evgeny777
> Date: Fri Jan 27 05:01:43 2017
> New Revision: 293276
>
> URL: http://llvm.org/viewvc/llvm-project?rev=293276&view=rev
> Log:
> [ELF] Bypass section type check
>
> Differential revision: https://reviews.llvm.org/D28761
>
> Added:
>     lld/trunk/test/ELF/linkerscript/section-types.s
> Modified:
>     lld/trunk/ELF/LinkerScript.cpp
>     lld/trunk/ELF/OutputSections.cpp
>     lld/trunk/ELF/OutputSections.h
>     lld/trunk/ELF/Writer.cpp
>
> Modified: lld/trunk/ELF/LinkerScript.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=293276&r1=293275&r2=293276&view=diff
> ==============================================================================
> --- lld/trunk/ELF/LinkerScript.cpp (original)
> +++ lld/trunk/ELF/LinkerScript.cpp Fri Jan 27 05:01:43 2017
> @@ -288,7 +288,7 @@ void LinkerScript<ELFT>::addSection(Outp
>                                      StringRef Name) {
>    OutputSectionBase *OutSec;
>    bool IsNew;
> -  std::tie(OutSec, IsNew) = Factory.create(Sec, Name);
> +  std::tie(OutSec, IsNew) = Factory.create(Sec, Name, true);
>    if (IsNew)
>      OutputSections->push_back(OutSec);
>    OutSec->addSection(Sec);
>
> Modified: lld/trunk/ELF/OutputSections.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=293276&r1=293275&r2=293276&view=diff
> ==============================================================================
> --- lld/trunk/ELF/OutputSections.cpp (original)
> +++ lld/trunk/ELF/OutputSections.cpp Fri Jan 27 05:01:43 2017
> @@ -631,9 +631,9 @@ template <class ELFT> OutputSectionFacto
>  template <class ELFT>
>  std::pair<OutputSectionBase *, bool>
>  OutputSectionFactory<ELFT>::create(InputSectionBase<ELFT> *C,
> -                                   StringRef OutsecName) {
> +                                   StringRef OutsecName, bool IsScripted) {

I specifically asked for you to *not* add linker script specific
logic. Please revert.

Cheers,
Rafael


More information about the llvm-commits mailing list