[PATCH] [lld] Reapply "[ELF] Only mark as DT_NEEDED libs that are strictly necessary"

Rafael Auler rafaelauler at gmail.com
Thu Oct 9 14:53:16 PDT 2014


Hi Bigcheese, atanasyan, shankarke,

When committed in r219353, this patch originally caused problems because I have had only tested it using an optimized build. However, in debug builds, LLD (in Driver.cpp) adds two additional passes that serializes all atoms via YAML and reads it back. Since I have changed ObjectAtom to hold a new reference, the serialization was removing the extra data.

I decided to implement this in another way, similar to the original MIPS way, by using a StringSet that holds the names of all copied atoms instead of directly holding a reference to the copied atom. In this way, I simplify this patch and eliminate the necessity of changing the DefinedAtom hierarchy to hold a new data.

http://reviews.llvm.org/D5713

Files:
  include/lld/ReaderWriter/ELFLinkingContext.h
  lib/ReaderWriter/ELF/AArch64/AArch64LinkingContext.h
  lib/ReaderWriter/ELF/DefaultLayout.h
  lib/ReaderWriter/ELF/ExecutableWriter.h
  lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h
  lib/ReaderWriter/ELF/Mips/MipsELFWriters.h
  lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h
  lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp
  lib/ReaderWriter/ELF/Mips/MipsLinkingContext.h
  lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
  lib/ReaderWriter/ELF/OutputELFWriter.h
  lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5713.14679.patch
Type: text/x-patch
Size: 9378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141009/567fa9d2/attachment.bin>


More information about the llvm-commits mailing list