[PATCH] D30901: [ELF] - Fill between executable sections with trap instructions

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 09:51:22 PDT 2017


grimar created this revision.

Currently, LLD leaves padding between executable sections as-is, so they are 0. 
That is not desirable. Disassemblers would interpret the sequences of 0 bytes at 
end of each function as machine instructions and print out bogus disassembly.

Patch adds filling of gaps between executable sections with one byte target 
specific trap instruction.

This is PR32227.


https://reviews.llvm.org/D30901

Files:
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h
  ELF/OutputSections.cpp
  ELF/SyntheticSections.cpp
  ELF/Target.cpp
  ELF/Target.h
  test/ELF/linkerscript/excludefile.s
  test/ELF/linkerscript/sections-padding-exec.s
  test/ELF/sections-padding-exec-i686.s
  test/ELF/sections-padding-exec.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30901.91579.patch
Type: text/x-patch
Size: 8257 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170313/dc9532bf/attachment.bin>


More information about the llvm-commits mailing list