summaryrefslogtreecommitdiffstats
path: root/upstream/fedora-rawhide/man1/objcopy.1
diff options
context:
space:
mode:
Diffstat (limited to 'upstream/fedora-rawhide/man1/objcopy.1')
-rw-r--r--upstream/fedora-rawhide/man1/objcopy.133
1 files changed, 27 insertions, 6 deletions
diff --git a/upstream/fedora-rawhide/man1/objcopy.1 b/upstream/fedora-rawhide/man1/objcopy.1
index f3b6e52c..0611d3d8 100644
--- a/upstream/fedora-rawhide/man1/objcopy.1
+++ b/upstream/fedora-rawhide/man1/objcopy.1
@@ -55,7 +55,7 @@
.\" ========================================================================
.\"
.IX Title "OBJCOPY 1"
-.TH OBJCOPY 1 2024-02-22 binutils-2.42.50 "GNU Development Tools"
+.TH OBJCOPY 1 2024-05-13 binutils-2.42.50 "GNU Development Tools"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -605,6 +605,10 @@ section address. See the comments under \fB\-\-change\-addresses\fR,
above. If \fIsectionpattern\fR does not match any sections in the
input file, a warning will be issued, unless
\&\fB\-\-no\-change\-warnings\fR is used.
+.Sp
+Note \- changing the VMA of sections in a fully linked binary can be
+dangerous since there may be code that expects the sections to be
+located at their old address.
.IP \fB\-\-change\-warnings\fR 4
.IX Item "--change-warnings"
.PD 0
@@ -642,6 +646,13 @@ SHF_X86_64_LARGE.
Set the alignment for any sections matching \fIsectionpattern\fR.
\&\fIalign\fR specifies the alignment in bytes and must be a power of
two, i.e. 1, 2, 4, 8....
+.Sp
+Note \- setting a section's alignment will not automatically align its
+LMA or VMA addresses. If those need to be changed as well then the
+\&\fB\-\-change\-section\-lma\fR and/or \fB\-\-change\-section\-vma\fR
+options should be used. Also note that changing VMAs can cause
+problems in fully linked binaries where there may be code that expects
+the contents of the sections to be located at their old address.
.IP "\fB\-\-add\-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR" 4
.IX Item "--add-section sectionname=filename"
Add a new section named \fIsectionname\fR while copying the file. The
@@ -911,8 +922,8 @@ As long as the debug info file has been installed into one of these
locations before the debugger is run everything should work
correctly.
.RE
-.IP \fB\-\-keep\-section\-symbils\fR 4
-.IX Item "--keep-section-symbils"
+.IP \fB\-\-keep\-section\-symbols\fR 4
+.IX Item "--keep-section-symbols"
When stripping a file, perhaps with \fB\-\-strip\-debug\fR or
\&\fB\-\-strip\-unneeded\fR, retain any symbols specifying section names,
which would otherwise get stripped.
@@ -1029,10 +1040,20 @@ for dlls.
[This option is specific to PE targets.]
.IP "\fB\-\-section\-alignment\fR \fInum\fR" 4
.IX Item "--section-alignment num"
-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.]
+.Sp
+Sets the section alignment field in the PE header \- if one is present
+in the binary. Sections in memory will always begin at addresses
+which are a multiple of this number. Defaults to 0x1000.
+.Sp
+Note \- this option will also set the alignment field in each section's
+flags.
+.Sp
+Note \- if a section's LMA or VMA addresses are no longer aligned, and
+those addresses have not been set via the \fB\-\-set\-section\-lma\fR or
+\&\fB\-\-set\-section\-vma\fR options, and the file has been fully
+relocated then a warning message will be issued. It will then be up
+to the user to decide if the LMA and VMA need updating.
.IP "\fB\-\-stack\fR \fIreserve\fR" 4
.IX Item "--stack reserve"
.PD 0