aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-12-22 11:50:44 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-12-22 11:50:44 +0000
commitc14a5a8800a0f7a007f8cd197b4cad4d26a78f8c (patch)
treea1dde3bcaa50b579a1c761196c9bb100d2021707 /contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
parent3cf3b4e6419d14ed25c0b67b84763b3be937c8b5 (diff)
parentb96995b67f15110f39c41149543e19c8189abdaf (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp')
-rw-r--r--contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp b/contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
index b366c6e55987..2e25a47dde01 100644
--- a/contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
+++ b/contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
@@ -504,6 +504,12 @@ static Error replaceAndRemoveSections(const CopyConfig &Config, Object &Obj) {
return false;
if (StringRef(Sec.Name).startswith(".gnu.warning"))
return false;
+ // We keep the .ARM.attribute section to maintain compatibility
+ // with Debian derived distributions. This is a bug in their
+ // patchset as documented here:
+ // https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=943798
+ if (Sec.Type == SHT_ARM_ATTRIBUTES)
+ return false;
if (Sec.ParentSegment != nullptr)
return false;
return (Sec.Flags & SHF_ALLOC) == 0;