aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite/binutils-all
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2019-10-02 11:55:02 +0100
committerNick Clifton <nickc@redhat.com>2019-10-02 11:55:02 +0100
commitde4859eacb74a440d9fd61e4a0f051e3737a05dd (patch)
treeaf63b3781d3bf350958b4ee7f407ebd805dec414 /binutils/testsuite/binutils-all
parentc292080e11976e05603af9a91a67b052c33b56e3 (diff)
downloadgdb-de4859eacb74a440d9fd61e4a0f051e3737a05dd.zip
gdb-de4859eacb74a440d9fd61e4a0f051e3737a05dd.tar.gz
gdb-de4859eacb74a440d9fd61e4a0f051e3737a05dd.tar.bz2
Change objcopy's --set-section-alignment option to take a byte alignment value rather than a power of two alignment value.
PR 24942 * objcopy.c (copy_usage): Update description of --set-section-alignment. (copy_main): Interpret numeric argument of --set-section-alignment as a byte alignment, not a power of two alignment. * doc/binutils.texi: Update description of --set-section-alignment. * testsuite/binutils-all/set-section-alignment.d: New test. * testsuite/binutils-all/objcopy.exp: Run the new test.
Diffstat (limited to 'binutils/testsuite/binutils-all')
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp2
-rw-r--r--binutils/testsuite/binutils-all/set-section-alignment.d9
2 files changed, 11 insertions, 0 deletions
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index 3e3c355..e12a828 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -1310,3 +1310,5 @@ proc objcopy_remove_relocations_from_executable { } {
objcopy_remove_relocations_from_executable
run_dump_test "pr23633"
+
+run_dump_test "set-section-alignment"
diff --git a/binutils/testsuite/binutils-all/set-section-alignment.d b/binutils/testsuite/binutils-all/set-section-alignment.d
new file mode 100644
index 0000000..d562ce1
--- /dev/null
+++ b/binutils/testsuite/binutils-all/set-section-alignment.d
@@ -0,0 +1,9 @@
+#source: pr23633.s
+#PROG: objcopy
+#objcopy: --set-section-alignment .text=16
+#objdump: --section-headers
+#notarget: *-*-*aout *-*-*coff *-*-cygwin* *-*-darwin *-*-mingw* *-*-go32 *-*-*pe hppa*-*-hpux* ns32k-*-* powerpc-*-aix* rs6000-*-* rx-*-* *-*-vms
+
+#...
+.*\.text.*2\*\*4
+#pass