[PATCH] D10901: [ELF] Define __start_XXX/__stop_XXX symbols where XXX is a section name

Simon Atanasyan simon at atanasyan.com
Thu Jul 2 09:15:28 PDT 2015


atanasyan created this revision.
atanasyan added reviewers: ruiu, shankar.easwaran.
atanasyan added a subscriber: llvm-commits-list.
atanasyan set the repository for this revision to rL LLVM.
atanasyan added a project: lld.

This is GNU ELF linker extension used particularly by LibC code. If input object files contain section named XXX and the XXX is a valid C identifier, and there are undefined or weak symbols __start_XXX/__stop_XXX, linker should define __start_XXX/__stop_XXX symbols point to the begin/end of the XXX section correspondingly.

For example, without support of this extension statically linked executables for X86_64 and Mips (maybe other) targets do not flush IO buffers at the end of executing.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10901

Files:
  include/lld/ReaderWriter/ELFLinkingContext.h
  lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h
  lib/ReaderWriter/ELF/ELFFile.cpp
  lib/ReaderWriter/ELF/ELFLinkingContext.cpp
  lib/ReaderWriter/ELF/OutputELFWriter.cpp
  lib/ReaderWriter/ELF/OutputELFWriter.h
  test/elf/start-stop-sym.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10901.28956.patch
Type: text/x-patch
Size: 9384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150702/3daee6c3/attachment.bin>


More information about the llvm-commits mailing list