[PATCH] D28984: [LLD] Do not allocate space for common symbols with -r

Mark Kettenis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 21 15:37:04 PST 2017


kettenis created this revision.

Currently ld.lld -r allocates space for common symbols, whereas ld.bfd -r doesn't.
As a result the OpenBSD makefile bits for creating libraries fail as they use ld -X -r to strip local symbols,
which results in duplicate symbol errors because space for the common symbols has been allocated.

The diff also implements the --define-commons option such that allocation of commons can be forced even
if -r is used.


https://reviews.llvm.org/D28984

Files:
  lld/ELF/Config.h
  lld/ELF/Driver.cpp
  lld/ELF/Options.td
  lld/ELF/Symbols.cpp
  lld/ELF/SyntheticSections.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28984.85250.patch
Type: text/x-patch
Size: 4326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170121/13711f7f/attachment.bin>


More information about the llvm-commits mailing list