[PATCH] D18814: Implement --start-lib and --end-lib.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 6 12:23:53 PDT 2016
rafael added a subscriber: rafael.
rafael added a comment.
General idea sounds reasonable, but we have to make sure it works with bitcode too.
================
Comment at: ELF/InputFiles.cpp:285
@@ -284,1 +284,3 @@
template <class ELFT> void elf::ObjectFile<ELFT>::initializeSymbols() {
+ for (const Elf_Shdr &Sec : this->ELFObj.sections())
+ if (Sec.sh_type == SHT_DYNSYM)
----------------
Why do you need this?
================
Comment at: ELF/InputFiles.h:44
@@ +43,3 @@
+ ArchiveKind,
+ BitcodeKind
+ };
----------------
So, --start-lib foo.bc --end-lib should work. This suggests that it should be a flag in the class saying that it is lazy, not a new type.
================
Comment at: ELF/InputFiles.h:165
@@ -156,1 +164,3 @@
+template <class ELFT> class LazyObjectFile : public ELFFileBase<ELFT> {
+ typedef ELFFileBase<ELFT> Base;
----------------
It should be possible to use bitcode files in --start-lib/--end-lib, so this should inherit from InputFile, like ArchiveFile does
It can then have two subclasses or just know that it can be wrapping a .o or a .bc.
http://reviews.llvm.org/D18814
More information about the llvm-commits
mailing list