[llvm-objcopy] Preserve .ARM.attributes section when stripping files
This works around a bug in Debian's patchset for glibc. The bug is
described in detail in the upstream debian bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=943798, but the short
version of it is that glibc on any Debian based distro don't load
libraries unless it has a .ARM.attribute section.
Reviewed by: jhenderson, rupprecht, MaskRay, jakehehrlich
Differential Revision: https://reviews.llvm.org/D69188
Patch by Tobias Hieta.
diff --git a/llvm/docs/CommandGuide/llvm-objcopy.rst b/llvm/docs/CommandGuide/llvm-objcopy.rst
index 3848e88..f421106 100644
--- a/llvm/docs/CommandGuide/llvm-objcopy.rst
+++ b/llvm/docs/CommandGuide/llvm-objcopy.rst
@@ -98,7 +98,8 @@
.. option:: --strip-all, -S
For ELF objects, remove from the output all symbols and non-alloc sections not
- within segments, except for .gnu.warning sections and the section name table.
+ within segments, except for .gnu.warning, .ARM.attribute sections and the
+ section name table.
For COFF and Mach-O objects, remove all symbols, debug sections, and
relocations from the output.
diff --git a/llvm/docs/CommandGuide/llvm-strip.rst b/llvm/docs/CommandGuide/llvm-strip.rst
index e1f07d9..0e95996 100644
--- a/llvm/docs/CommandGuide/llvm-strip.rst
+++ b/llvm/docs/CommandGuide/llvm-strip.rst
@@ -77,7 +77,8 @@
.. option:: --strip-all, -S
For ELF objects, remove from the output all symbols and non-alloc sections not
- within segments, except for .gnu.warning sections and the section name table.
+ within segments, except for .gnu.warning, .ARM.attribute sections and the
+ section name table.
For COFF objects, remove all symbols, debug sections, and relocations from the
output.