[PATCH] D41046: [ELF] Make overlapping output sections an error

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 9 01:11:37 PST 2017


arichardson created this revision.
Herald added subscribers: llvm-commits, mgrang, emaste.

While trying to make a linker script behave the same way with lld as it did
with bfd, I discovered that lld currently doesn't diagnose overlapping
output sections. I was getting very strange runtime failures which I
tracked down to overlapping sections in the resulting binary. When linking
with ld.bfd overlapping output sections are an error unless
--noinhibit-exec is passed and I believe lld should behave the same way
here to avoid surprising crashes at runtime.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D41046

Files:
  ELF/Config.h
  ELF/Relocations.cpp
  ELF/Writer.cpp
  test/ELF/linkerscript/overlapping-sections.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41046.126269.patch
Type: text/x-patch
Size: 15466 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171209/5a20d103/attachment.bin>


More information about the llvm-commits mailing list