mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
[AArch64] Set the minimum alignment on code segments
gas/ 2015-03-10 Matthew Wahab <matthew.wahab@arm.com> * config/tc-aarch64.c (mapping_state): Set minimum alignment for code sections. gas/testsuite 2015-03-10 Matthew Wahab <matthew.wahab@arm.com> * gas/aarch64/codealign.d: Add test for code section alignment. * gas/aarch64/codealign.s: New file.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2015-03-10 Matthew Wahab <matthew.wahab@arm.com>
|
||||||
|
|
||||||
|
* config/tc-aarch64.c (mapping_state): Set minimum alignment for
|
||||||
|
code sections.
|
||||||
|
|
||||||
2015-03-10 Nick Clifton <nickc@redhat.com>
|
2015-03-10 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR gas/17852
|
PR gas/17852
|
||||||
|
@ -1478,7 +1478,14 @@ mapping_state (enum mstate state)
|
|||||||
/* The mapping symbol has already been emitted.
|
/* The mapping symbol has already been emitted.
|
||||||
There is nothing else to do. */
|
There is nothing else to do. */
|
||||||
return;
|
return;
|
||||||
else if (TRANSITION (MAP_UNDEFINED, MAP_DATA))
|
|
||||||
|
if (state == MAP_INSN)
|
||||||
|
/* AArch64 instructions require 4-byte alignment. When emitting
|
||||||
|
instructions into any section, record the appropriate section
|
||||||
|
alignment. */
|
||||||
|
record_alignment (now_seg, 2);
|
||||||
|
|
||||||
|
if (TRANSITION (MAP_UNDEFINED, MAP_DATA))
|
||||||
/* This case will be evaluated later in the next else. */
|
/* This case will be evaluated later in the next else. */
|
||||||
return;
|
return;
|
||||||
else if (TRANSITION (MAP_UNDEFINED, MAP_INSN))
|
else if (TRANSITION (MAP_UNDEFINED, MAP_INSN))
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2015-03-10 Matthew Wahab <matthew.wahab@arm.com>
|
||||||
|
|
||||||
|
* gas/aarch64/codealign.d: Add test for code section alignment.
|
||||||
|
* gas/aarch64/codealign.s: New file.
|
||||||
|
|
||||||
2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
|
2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
|
||||||
|
|
||||||
PR gas/17843
|
PR gas/17843
|
||||||
|
16
gas/testsuite/gas/aarch64/codealign.d
Normal file
16
gas/testsuite/gas/aarch64/codealign.d
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#objdump: --section-headers
|
||||||
|
# Minimum code alignment should be set.
|
||||||
|
# This test is only valid on ELF based ports.
|
||||||
|
#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
|
||||||
|
|
||||||
|
.*: +file format.*aarch64.*
|
||||||
|
|
||||||
|
Sections:
|
||||||
|
Idx Name Size VMA LMA File off Algn
|
||||||
|
0 \.text .* .* .* .* 2\*\*2
|
||||||
|
.*CODE.*
|
||||||
|
1 \.data .* .* .* .* 2\*\*0
|
||||||
|
.*DATA.*
|
||||||
|
2 \.bss .* .* .* .* 2\*\*0
|
||||||
|
.*
|
||||||
|
|
2
gas/testsuite/gas/aarch64/codealign.s
Normal file
2
gas/testsuite/gas/aarch64/codealign.s
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.text
|
||||||
|
nop
|
Reference in New Issue
Block a user