From 1d15e434f43bc41a07bc7b0648fcb7e6ccbe8dcc Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 13 Apr 2017 14:50:56 +0100 Subject: Add note merging to strip and add code to merge stack size notes. * objcopy.c: Add --no-merge-notes option to disable note merging. Add --[no-]merge-notes option to strip, and enable it by default. (num_bytes): New function. (merge_gnu_build_notes): Add code to merge stack size notes. * binutils.texi: Update strip and objcopy documentation. * readelf.c (print_gnu_build_attribute_name): Use defined constants for note types. --- binutils/doc/binutils.texi | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'binutils/doc') diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index da4ed52..23d8685 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -1191,6 +1191,7 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}] [@option{--decompress-debug-sections}] [@option{--elf-stt-common=@var{val}}] [@option{--merge-notes}] + [@option{--no-merge-notes}] [@option{-v}|@option{--verbose}] [@option{-V}|@option{--version}] [@option{--help}] [@option{--info}] @@ -2008,8 +2009,9 @@ converted to the @code{STT_COMMON} or @code{STT_OBJECT} type. type to @code{STT_OBJECT}. @item --merge-notes -For ELF files, attempt to reduce the size of any SHT_NOTE type -sections by removing duplicate notes. +@itemx --no-merge-notes +For ELF files, attempt (or do not attempt) to reduce the size of any +SHT_NOTE type sections by removing duplicate notes. @item -V @itemx --version @@ -3114,7 +3116,8 @@ strip [@option{-F} @var{bfdname} |@option{--target=}@var{bfdname}] [@option{-s}|@option{--strip-all}] [@option{-S}|@option{-g}|@option{-d}|@option{--strip-debug}] [@option{--strip-dwo}] - [@option{-K} @var{symbolname} |@option{--keep-symbol=}@var{symbolname}] + [@option{-K} @var{symbolname}|@option{--keep-symbol=}@var{symbolname}] + [@option{-M}|@option{--merge-notes}][@option{--no-merge-notes}] [@option{-N} @var{symbolname} |@option{--strip-symbol=}@var{symbolname}] [@option{-w}|@option{--wildcard}] [@option{-x}|@option{--discard-all}] [@option{-X} |@option{--discard-locals}] @@ -3241,6 +3244,13 @@ Remove all symbols that are not needed for relocation processing. When stripping symbols, keep symbol @var{symbolname} even if it would normally be stripped. This option may be given more than once. +@item -M +@itemx --merge-notes +@itemx --no-merge-notes +For ELF files, attempt (or do not attempt) to reduce the size of any +SHT_NOTE type sections by removing duplicate notes. The default is to +attempt this reduction. + @item -N @var{symbolname} @itemx --strip-symbol=@var{symbolname} Remove symbol @var{symbolname} from the source file. This option may be -- cgit v1.1