[PATCH][AArch64][gas] Set the minimum alignment on code segments.
Matthew Wahab
matthew.wahab@arm.com
Thu Mar 5 11:30:00 GMT 2015
On AArch64, gas doesn't set the minimum alignment for code segments
making it possible for a segment to become misaligned during a link. It
is also inconsistent with the ABI (4.3.5: Section Alignment).
This patch sets the minimum alignment for a section to 4 bytes, if the
section contains an instruction.
A similar issue in the ARM backend has already been fixed
(https://sourceware.org/bugzilla/show_bug.cgi?id=12931).
Tested aarch64-none-linux-gnu and aarch64-none-elf with check-gas,
check-ld, check-binutils.
Ok for trunk?
Matthew
gas/
2015-03-05 Matthew Wahab <matthew.wahab@arm.com>
* config/tc-aarch64.c (mapping_state): Set minimum alignment for
code sections.
gas/testsuite
2015-03-05 Matthew Wahab <matthew.wahab@arm.com>
* gas/aarch64/codealign.d: Add test for code section alignment.
* gas/aarch64/codealign.s: New file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: codealign.patch
Type: text/x-patch
Size: 1707 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150305/0f6ad9ae/attachment.bin>
More information about the Binutils
mailing list