hanchenye-llvm-project/llvm/tools/llvm-objcopy
Jordan Rupprecht 17dd4a2c5e [llvm-objcopy] Use SHT_NOTE for added note sections.
Summary:
Fix llvm-objcopy to add .note sections as SHT_NOTEs. GNU objcopy overrides section flags for special sections. For `.note` sections (with the exception of `.note.GNU-stack`), SHT_NOTE is used.

Many other sections are special cased by libbfd, but `.note` is the only special section I can seem to find being used with objcopy --add-section.

See `.note` in context of the full list of special sections here: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/elf.c;h=eb3e1828e9c651678b95a1dcbc3b124783d1d2be;hb=HEAD#l2675

Reviewers: jhenderson, alexshap, jakehehrlich, espindola

Reviewed By: jhenderson

Subscribers: emaste, arichardson, llvm-commits

Differential Revision: https://reviews.llvm.org/D56570

llvm-svn: 351204
2019-01-15 16:57:23 +00:00
..
COFF [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols 2019-01-15 09:34:55 +00:00
ELF [llvm-objcopy] Use SHT_NOTE for added note sections. 2019-01-15 16:57:23 +00:00
Buffer.cpp [llvm-objcopy] Factor out Buffer 2018-10-16 05:40:18 +00:00
Buffer.h [llvm-objcopy] Factor out Buffer 2018-10-16 05:40:18 +00:00
CMakeLists.txt [llvm-objcopy] [COFF] Add support for removing symbols 2019-01-10 21:28:24 +00:00
CopyConfig.cpp [llvm-objcopy] Handle -O <format> flag. 2019-01-07 16:59:12 +00:00
CopyConfig.h [llvm-objcopy] Handle -O <format> flag. 2019-01-07 16:59:12 +00:00
LLVMBuild.txt Recommit "[llvm-objcopy] Switch over to using TableGen for parsing arguments" 2018-04-24 05:43:32 +00:00
ObjcopyOpts.td [llvm-objcopy] Change --only-keep to --only-section 2018-12-06 02:03:53 +00:00
StripOpts.td [llvm-objcopy] Hook up the -V alias to --version, output "GNU strip" 2018-11-28 06:51:50 +00:00
llvm-objcopy.cpp [llvm-objcopy] Initial COFF support 2018-12-19 07:24:38 +00:00
llvm-objcopy.h [Support] Make error banner optional in logAllUnhandledErrors 2018-11-11 01:46:03 +00:00