[PATCH] D17502: [ELF] - Fix of 22906, referencing __start or __stop should keep the section from GC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 04:36:16 PST 2016


grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.

This fixes the https://llvm.org/bugs/show_bug.cgi?id=22906 bug.

In GNU Binutils, a reference to __start or __stop is sufficient to prevent the section from being garbage collected.
Patch implements the same behavior for lld.

http://reviews.llvm.org/D17502

Files:
  ELF/InputSection.cpp
  ELF/InputSection.h
  ELF/MarkLive.cpp
  ELF/OutputSections.cpp
  ELF/OutputSections.h
  ELF/Writer.cpp
  test/ELF/startstop-gccollect.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17502.48667.patch
Type: text/x-patch
Size: 7687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160222/b9b88f46/attachment.bin>


More information about the llvm-commits mailing list