aboutsummaryrefslogtreecommitdiff
path: root/binutils/doc
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2023-07-09 10:57:19 -0700
committerFangrui Song <i@maskray.me>2023-07-09 10:57:19 -0700
commit5e24da908dbf6ddeb03e2b194f6b39dea3c660f3 (patch)
treee794077f7d101002abb3d965f3377ebbbb4ea0a6 /binutils/doc
parent4fb2abb59d16f6395162f2e8d9494cde4a37e4a1 (diff)
downloadbinutils-5e24da908dbf6ddeb03e2b194f6b39dea3c660f3.zip
binutils-5e24da908dbf6ddeb03e2b194f6b39dea3c660f3.tar.gz
binutils-5e24da908dbf6ddeb03e2b194f6b39dea3c660f3.tar.bz2
PR30592 objcopy: allow --set-section-flags to add or remove SHF_X86_64_LARGE
For example, objcopy --set-section-flags .data=alloc,large will add SHF_X86_64_LARGE to the .data section. Omitting "large" will drop the SHF_X86_64_LARGE flag. The bfd_section flag is named generically, SEC_ELF_LARGE, in case other processors want to follow SHF_X86_64_LARGE. SEC_ELF_LARGE has the same value as SEC_TIC54X_BLOCK used by coff. bfd/ * section.c: Define SEC_ELF_LARGE. * bfd-in2.h: Regenerate. * elf64-x86-64.c (elf_x86_64_section_flags, elf_x86_64_fake_sections, elf_x86_64_copy_private_section_data): New. binutils/ * NEWS: Mention the new feature for objcopy. * doc/binutils.texi: Mention "large". * objcopy.c (parse_flags): Parse "large". (check_new_section_flags): Error if "large" is used with a non-x86-64 ELF target. * testsuite/binutils-all/x86-64/large-sections.d: New. * testsuite/binutils-all/x86-64/large-sections.s: New. * testsuite/binutils-all/x86-64/large-sections-i386.d: New. * testsuite/binutils-all/x86-64/large-sections-2.d: New. * testsuite/binutils-all/x86-64/large-sections-2-x32.d: New.
Diffstat (limited to 'binutils/doc')
-rw-r--r--binutils/doc/binutils.texi15
1 files changed, 8 insertions, 7 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 8314cb5..309bedf 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -1745,13 +1745,14 @@ Set the flags for any sections matching @var{sectionpattern}. The
@var{flags} argument is a comma separated string of flag names. The
recognized names are @samp{alloc}, @samp{contents}, @samp{load},
@samp{noload}, @samp{readonly}, @samp{code}, @samp{data}, @samp{rom},
-@samp{exclude}, @samp{share}, and @samp{debug}. You can set the
-@samp{contents} flag for a section which does not have contents, but it
-is not meaningful 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. In particular the
-@samp{share} flag is only meaningful for COFF format files and not for
-ELF format files.
+@samp{exclude}, @samp{share}, @samp{debug}, and @samp{large}.
+You can set the @samp{contents} flag for a section which does not have
+contents, but it is not meaningful 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. In particular the
+@samp{share} flag is only meaningful for COFF format files and not for ELF
+format files. The ELF x86-64 specific flag @samp{large} corresponds to
+SHF_X86_64_LARGE.
@item --set-section-alignment @var{sectionpattern}=@var{align}
Set the alignment for any sections matching @var{sectionpattern}.