[PATCH] D12545: [elf2] Add basic archive file support.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 10:40:50 PDT 2015


On Thu, Sep 3, 2015 at 6:17 AM, Rafael Espíndola <rafael.espindola at gmail.com
> wrote:

> Another thing: I see that you moved createFile out of Driver.cpp.
>
> That is not what COFF does and I think I agree with COFF on this one.
> The files we will support at the top level are not the ones we support
> inside a .a. It is better to error early if we are given a .so or a
> linker script inside an archive.
>

Yes, that's an deliberate choice that I made. A few more examples: In COFF,
import files are given only as members of archive files. Both in COFF and
ELF, archive files cannot be members of archive files.


>
> Cheers,
> Rafael
>
>
>
> On 2 September 2015 at 16:48, Rafael Espíndola
> <rafael.espindola at gmail.com> wrote:
> > The warnings with the file kind were really an issue with the existing
> > code. I have fixed that and rebased your patch. I also include the
> > change to use  std::vector<Lazy> LazySymbols;.
> >
> > The remaining warnings look like new issues:
> >
> > /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:317:13: warning:
> > enumeration value 'LazyKind' not handled in switch [-Wswitch]
> >     switch (Body->kind()) {
> >             ^
> > /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:317:13: warning:
> > enumeration value 'LazyKind' not handled in switch [-Wswitch]
> > /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:317:13: warning:
> > enumeration value 'LazyKind' not handled in switch [-Wswitch]
> > /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:317:13: warning:
> > enumeration value 'LazyKind' not handled in switch [-Wswitch]
> > /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:317:13: warning:
> > enumeration value 'LazyKind' not handled in switch [-Wswitch
> >
> > Please fix them and upload a new patch.
> >
> >
> > On 2 September 2015 at 11:50, Rafael Espíndola
> > <rafael.espindola at gmail.com> wrote:
> >> Why use a llvm::MallocAllocator? It seems better to not have an
> >> allocator and use a smart pointer or use a BumpPtrAllocator.
> >>
> >> Given that the allocator is used for exactly one allocation per file,
> >> wouldn't it be the same to replace
> >>
> >>   std::vector<Lazy *> LazySymbols;
> >>   llvm::MallocAllocator Alloc;
> >>
> >> With
> >>
> >>   std::vector<Lazy> LazySymbols
> >> ?
> >>
> >> On 2 September 2015 at 11:33, Rafael Ávila de Espíndola
> >> <llvm-commits at lists.llvm.org> wrote:
> >>> rafael added inline comments.
> >>>
> >>> ================
> >>> Comment at: ELF/InputFiles.cpp:15
> >>> @@ -14,2 +14,3 @@
> >>>  #include "llvm/ADT/STLExtras.h"
> >>> +#include "llvm/Support/FileSystem.h"
> >>>
> >>> ----------------
> >>> Not used.
> >>>
> >>>
> >>> http://reviews.llvm.org/D12545
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> 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/20150904/248951cc/attachment.html>


More information about the llvm-commits mailing list