[all-commits] [llvm/llvm-project] 497c76: [ELF] Keep local symbols when both --emit-relocs a...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Apr 21 08:29:10 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 497c76e96dcdfe39f486853ea3b17810be5b6e45
https://github.com/llvm/llvm-project/commit/497c76e96dcdfe39f486853ea3b17810be5b6e45
Author: Fangrui Song <maskray at google.com>
Date: 2020-04-21 (Tue, 21 Apr 2020)
Changed paths:
M lld/ELF/Driver.cpp
M lld/ELF/Writer.cpp
A lld/test/ELF/emit-relocs-discard-locals.s
A lld/test/ELF/relocatable-discard-locals.s
Log Message:
-----------
[ELF] Keep local symbols when both --emit-relocs and --discard-all are specified
This fixes a bug as exposed by D77807.
Add tests for {--emit-relocs,-r} x {--discard-locals,--discard-all}. They add coverage for previously undertested cases:
* STT_SECTION associated to GCed sections (`gc`)
* STT_SECTION associated to retained sections (`text`)
* STT_SECTION associated to non-SHF_ALLOC sections (`.comment`)
* STB_LOCAL in GCed sections (`unused_gc`)
Reviewed By: grimar, ikudrin
Differential Revision: https://reviews.llvm.org/D78389
More information about the All-commits
mailing list