mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
Do not insert more than MAX_MEM_FOR_RS_ALIGN_CODE bytes.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2001-05-06 Nick Clifton <nickc@cambridge.redhat.com>
|
||||||
|
|
||||||
|
* config/tc-arm.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.
|
||||||
|
* config/tc-arm.c (arm_handle_align): Do not insert more than
|
||||||
|
MAX_MEM_FOR_RS_ALIGN_CODE bytes.
|
||||||
|
(arm_frag_align_code): Use MAX_MEM_FOR_RS_ALIGN_CODE.
|
||||||
|
|
||||||
2001-05-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
|
2001-05-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
|
||||||
|
|
||||||
* Makefile.am (TARG_ENV_HFILES): Add te-hppa64.h and te-hppalinux64.h.
|
* Makefile.am (TARG_ENV_HFILES): Add te-hppa64.h and te-hppalinux64.h.
|
||||||
|
@ -8796,8 +8796,8 @@ s_arm_elf_cons (nbytes)
|
|||||||
of an rs_align_code fragment. */
|
of an rs_align_code fragment. */
|
||||||
|
|
||||||
void
|
void
|
||||||
arm_handle_align (fragp)
|
arm_handle_align (fragP)
|
||||||
fragS *fragp;
|
fragS *fragP;
|
||||||
{
|
{
|
||||||
static char const arm_noop[4] = { 0x00, 0x00, 0xa0, 0xe1 };
|
static char const arm_noop[4] = { 0x00, 0x00, 0xa0, 0xe1 };
|
||||||
static char const thumb_noop[2] = { 0xc0, 0x46 };
|
static char const thumb_noop[2] = { 0xc0, 0x46 };
|
||||||
@ -8808,14 +8808,17 @@ arm_handle_align (fragp)
|
|||||||
char * p;
|
char * p;
|
||||||
const char * noop;
|
const char * noop;
|
||||||
|
|
||||||
if (fragp->fr_type != rs_align_code)
|
if (fragP->fr_type != rs_align_code)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
|
bytes = fragP->fr_next->fr_address - fragP->fr_address - fragP->fr_fix;
|
||||||
p = fragp->fr_literal + fragp->fr_fix;
|
p = fragP->fr_literal + fragP->fr_fix;
|
||||||
fix = 0;
|
fix = 0;
|
||||||
|
|
||||||
if (fragp->tc_frag_data)
|
if (bytes > MAX_MEM_FOR_RS_ALIGN_CODE)
|
||||||
|
bytes = MAX_MEM_FOR_RS_ALIGN_CODE;
|
||||||
|
|
||||||
|
if (fragP->tc_frag_data)
|
||||||
{
|
{
|
||||||
if (target_big_endian)
|
if (target_big_endian)
|
||||||
noop = thumb_bigend_noop;
|
noop = thumb_bigend_noop;
|
||||||
@ -8848,8 +8851,8 @@ arm_handle_align (fragp)
|
|||||||
fix += noop_size;
|
fix += noop_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragp->fr_fix += fix;
|
fragP->fr_fix += fix;
|
||||||
fragp->fr_var = noop_size;
|
fragP->fr_var = noop_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called from md_do_align. Used to create an alignment
|
/* Called from md_do_align. Used to create an alignment
|
||||||
@ -8864,11 +8867,11 @@ arm_frag_align_code (n, max)
|
|||||||
|
|
||||||
/* We assume that there will never be a requirment
|
/* We assume that there will never be a requirment
|
||||||
to support alignments greater than 32 bytes. */
|
to support alignments greater than 32 bytes. */
|
||||||
if (max > 31)
|
if (max > MAX_MEM_FOR_RS_ALIGN_CODE)
|
||||||
as_fatal (_("alignments greater than 32 bytes not supported in .text sections."));
|
as_fatal (_("alignments greater than 32 bytes not supported in .text sections."));
|
||||||
|
|
||||||
p = frag_var (rs_align_code,
|
p = frag_var (rs_align_code,
|
||||||
31,
|
MAX_MEM_FOR_RS_ALIGN_CODE,
|
||||||
1,
|
1,
|
||||||
(relax_substateT) max,
|
(relax_substateT) max,
|
||||||
(symbolS *) NULL,
|
(symbolS *) NULL,
|
||||||
@ -8881,9 +8884,9 @@ arm_frag_align_code (n, max)
|
|||||||
/* Perform target specific initialisation of a frag. */
|
/* Perform target specific initialisation of a frag. */
|
||||||
|
|
||||||
void
|
void
|
||||||
arm_init_frag (fragp)
|
arm_init_frag (fragP)
|
||||||
fragS *fragp;
|
fragS *fragP;
|
||||||
{
|
{
|
||||||
/* Record whether this frag is in an ARM or a THUMB area. */
|
/* Record whether this frag is in an ARM or a THUMB area. */
|
||||||
fragp->tc_frag_data = thumb_mode;
|
fragP->tc_frag_data = thumb_mode;
|
||||||
}
|
}
|
||||||
|
@ -215,6 +215,8 @@ void armelf_frob_symbol PARAMS ((symbolS *, int *));
|
|||||||
#define DWARF2_LINE_MIN_INSN_LENGTH 2
|
#define DWARF2_LINE_MIN_INSN_LENGTH 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MAX_MEM_FOR_RS_ALIGN_CODE 31
|
||||||
|
|
||||||
/* For frags in code sections we need to record whether they contain
|
/* For frags in code sections we need to record whether they contain
|
||||||
ARM code or THUMB code. This is that if they have to be aligned,
|
ARM code or THUMB code. This is that if they have to be aligned,
|
||||||
they can contain the correct type of no-op instruction. */
|
they can contain the correct type of no-op instruction. */
|
||||||
|
Reference in New Issue
Block a user