[PATCH] D52506: Reset input section pointers to null on each linker invocation.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 09:50:52 PDT 2018


ruiu created this revision.
ruiu added a reviewer: grimar.
Herald added subscribers: jsji, atanasyan, kbarton, arichardson, nemanjai, sdardis, emaste, srhines.
Herald added a reviewer: javed.absar.
Herald added a reviewer: espindola.

Previously, if you invoke lld's `main` more than once in the same process,
the second invocation could fail or produce a wrong result due to a stale
pointer values of the previous run.


https://reviews.llvm.org/D52506

Files:
  lld/ELF/Arch/AArch64.cpp
  lld/ELF/Arch/ARM.cpp
  lld/ELF/Arch/Mips.cpp
  lld/ELF/Arch/PPC64.cpp
  lld/ELF/Arch/X86.cpp
  lld/ELF/Arch/X86_64.cpp
  lld/ELF/Driver.cpp
  lld/ELF/InputFiles.cpp
  lld/ELF/InputSection.cpp
  lld/ELF/LinkerScript.cpp
  lld/ELF/MapFile.cpp
  lld/ELF/OutputSections.cpp
  lld/ELF/Relocations.cpp
  lld/ELF/Symbols.cpp
  lld/ELF/SyntheticSections.cpp
  lld/ELF/SyntheticSections.h
  lld/ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52506.166938.patch
Type: text/x-patch
Size: 72305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180925/9665bb99/attachment-0001.bin>


More information about the llvm-commits mailing list