summaryrefslogtreecommitdiff
path: root/binutils/doc
diff options
context:
space:
mode:
authorNiklas G?rtler <profclonk@gmail.com>2019-08-28 12:33:41 +0100
committerNick Clifton <nickc@redhat.com>2019-08-28 12:33:41 +0100
commitfa463e9fc644e7a3bad39aa73bf6be72ea865805 (patch)
tree8cf65d7b31acaa739e104787a35dcf7022d3cc9f /binutils/doc
parenta1c110a3fe02f5cb8de18137f6615005288e849e (diff)
downloadbinutils-gdb-fa463e9fc644e7a3bad39aa73bf6be72ea865805.tar.gz
Add an option to objcopy to change the alignment of sections.
PR 24942 * objcopy.c (SECTION_CONTEXT_SET_ALIGNMENT): New constant. (struct section_list): Add alignment field. (command_line_switch): Add OPTION_SET_SECTION_ALIGNMENT. (copy_options): Add --set-section-alignment. (copy_usage): Describe --set-section-alignment. (find_section_list): Initialise the alignment field. (setup_section): Handle the alignment field. (copy_main): Handle OPTION_SET_SECTION_ALIGNMENT. * doc/binutils.texi: Document the new feature. * NEWS: Mention the new feature.
Diffstat (limited to 'binutils/doc')
-rw-r--r--binutils/doc/binutils.texi11
1 files changed, 9 insertions, 2 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index f6cdbdb5a7f..bb37cb09884 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -1175,6 +1175,7 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{--change-section-vma} @var{sectionpattern}@{=,+,-@}@var{val}]
[@option{--change-warnings}] [@option{--no-change-warnings}]
[@option{--set-section-flags} @var{sectionpattern}=@var{flags}]
+ [@option{--set-section-alignment} @var{sectionpattern}=@var{align}]
[@option{--add-section} @var{sectionname}=@var{filename}]
[@option{--dump-section} @var{sectionname}=@var{filename}]
[@option{--update-section} @var{sectionname}=@var{filename}]
@@ -1620,6 +1621,11 @@ to clear the @samp{contents} flag of a section which does have
contents--just remove the section instead. Not all flags are
meaningful for all object file formats.
+@item --set-section-alignment @var{sectionpattern}=@var{align}
+Set the alignment for any sections matching @var{sectionpattern}. @var{align}
+specifies the alignment as the exponent for the power of two, i.e. the
+alignment in bytes will be 2^@var{align}.
+
@item --add-section @var{sectionname}=@var{filename}
Add a new section named @var{sectionname} while copying the file. The
contents of the new section are taken from the file @var{filename}. The
@@ -1975,8 +1981,9 @@ for dlls.
[This option is specific to PE targets.]
@item --section-alignment @var{num}
-Sets the section alignment. Sections in memory will always begin at
-addresses which are a multiple of this number. Defaults to 0x1000.
+Sets the section alignment field in the PE header. Sections in memory
+will always begin at addresses which are a multiple of this number.
+Defaults to 0x1000.
[This option is specific to PE targets.]
@item --stack @var{reserve}