diff options
author | Nick Clifton <nickc@redhat.com> | 2019-10-02 11:55:02 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2019-10-02 11:55:02 +0100 |
commit | de4859eacb74a440d9fd61e4a0f051e3737a05dd (patch) | |
tree | af63b3781d3bf350958b4ee7f407ebd805dec414 /binutils/testsuite/binutils-all | |
parent | c292080e11976e05603af9a91a67b052c33b56e3 (diff) | |
download | gdb-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.exp | 2 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/set-section-alignment.d | 9 |
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 |