[PATCH] D75536: Add support for --unique option
Dave Bozier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 08:55:32 PST 2020
davidb created this revision.
Herald added subscribers: llvm-commits, MaskRay, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
Places orphan sections into a unique output section. This prevents the merging of orphan sections of the same name. Matches behaviour of gnu LD option --unique[=SECTION], with the exception I haven't added the wildcard SECTION support.
Motivated user case shown in the test has 2 local symbols as they would appear if C++ source has been compiled with -ffunction-sections. The merging of these sections in the case of a partial link (-r) inhibits deadstripping.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75536
Files:
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/LinkerScript.cpp
lld/ELF/Options.td
lld/test/ELF/Inputs/unique-orphans.s
lld/test/ELF/unique-orphans.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75536.247923.patch
Type: text/x-patch
Size: 4057 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200303/b75ec8fa/attachment.bin>
More information about the llvm-commits
mailing list