[lld] r287675 - [ELF] Convert .rld_map to input section

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 11:34:44 PST 2016


Fixed in r287683.

On Tue, Nov 22, 2016 at 11:30 AM, Meador Inge via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Tue, Nov 22, 2016 at 05:49:14PM +0000, Eugene Leviant via llvm-commits
> wrote:
>
> > +// This is a MIPS specific section to hold a space within the data
> segment
> > +// of executable file which is pointed to by the DT_MIPS_RLD_MAP entry.
> > +// See "Dynamic section" in Chapter 5 in the following document:
> > +// ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
> > +template <class ELFT> class MipsRldMap : public SyntheticSection<ELFT> {
> > +public:
> > +  MipsRldMap();
> > +  size_t getSize() const override { return sizeof(typename ELFT::uint);
> }
> > +  void writeTo(uint8_t *Buf) override;
> > +};
> > +
> >  template <class ELFT> InputSection<ELFT> *createCommonSection();
> >  template <class ELFT> InputSection<ELFT> *createInterpSection();
> >  template <class ELFT> MergeInputSection<ELFT> *createCommentSection();
> > @@ -618,6 +629,7 @@ template <class ELFT> struct In {
> >    static GotPltSection<ELFT> *GotPlt;
> >    static HashTableSection<ELFT> *HashTab;
> >    static InputSection<ELFT> *Interp;
> > +  static MipsRldMap<ELFT> *MipsRldMap;
>
> This seems to break my build (GCC 5.2.0) b/c the static variable is named
> the same as its class:
>
> In file included from
> /scratch/meadori/llvm-mainline/src/llvm/tools/lld/
> ELF/InputSection.cpp:18:0:
> /scratch/meadori/llvm-mainline/src/llvm/tools/lld/
> ELF/SyntheticSections.h:632:28:
> error: declaration of 'lld::elf::MipsRldMap<ELFT>*
> lld::elf::In<ELFT>::MipsRldMap' [-fpermissive]
>    static MipsRldMap<ELFT> *MipsRldMap;
>                             ^
> /scratch/meadori/llvm-mainline/src/llvm/tools/lld/
> ELF/SyntheticSections.h:606:29:
> error: changes meaning of 'MipsRldMap' from 'class
> lld::elf::MipsRldMap<ELFT>' [-fpermissive]
>  template <class ELFT> class MipsRldMap : public SyntheticSection<ELFT> {
>                              ^
> tools/lld/ELF/CMakeFiles/lldELF.dir/build.make:230: recipe for target
> 'tools/lld/ELF/CMakeFiles/lldELF.dir/InputSection.cpp.o' failed
>
> --
> Meador Inge
> meadori at codesourcery.com
> CodeSourcery / Mentor Embedded
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161122/3d0f06f8/attachment.html>


More information about the llvm-commits mailing list