mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
Do not dump literal pool when a .section .line directive is encountered.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
1999-09-02 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
|
* config/tc-mcore.c (mcore_s_section): Do not dump literals if a
|
||||||
|
.section .line directive is encountered.
|
||||||
|
|
||||||
1999-09-01 Nick Clifton <nickc@cygnus.com>
|
1999-09-01 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
* config/tc-arm.c (md_section_align): Do not align sections in ELF
|
* config/tc-arm.c (md_section_align): Do not align sections in ELF
|
||||||
|
@ -40,6 +40,7 @@ static void mcore_s_literals PARAMS ((int));
|
|||||||
static void mcore_cons PARAMS ((int));
|
static void mcore_cons PARAMS ((int));
|
||||||
static void mcore_float_cons PARAMS ((int));
|
static void mcore_float_cons PARAMS ((int));
|
||||||
static void mcore_stringer PARAMS ((int));
|
static void mcore_stringer PARAMS ((int));
|
||||||
|
static void mcore_fill PARAMS ((int));
|
||||||
static int log2 PARAMS ((unsigned int));
|
static int log2 PARAMS ((unsigned int));
|
||||||
static char * parse_reg PARAMS ((char *, unsigned *));
|
static char * parse_reg PARAMS ((char *, unsigned *));
|
||||||
static char * parse_creg PARAMS ((char *, unsigned *));
|
static char * parse_creg PARAMS ((char *, unsigned *));
|
||||||
@ -194,6 +195,7 @@ const pseudo_typeS md_pseudo_table[] =
|
|||||||
{ "single", mcore_float_cons, 'f'},
|
{ "single", mcore_float_cons, 'f'},
|
||||||
{ "string", mcore_stringer, 1 },
|
{ "string", mcore_stringer, 1 },
|
||||||
{ "word", mcore_cons, 2 },
|
{ "word", mcore_cons, 2 },
|
||||||
|
{ "fill", mcore_fill, 0 },
|
||||||
|
|
||||||
/* Allow for the effect of section changes. */
|
/* Allow for the effect of section changes. */
|
||||||
{ "text", mcore_s_text, 0 },
|
{ "text", mcore_s_text, 0 },
|
||||||
@ -307,6 +309,40 @@ mcore_stringer (append_zero)
|
|||||||
check_literals (2, 0);
|
check_literals (2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mcore_fill (unused)
|
||||||
|
int unused;
|
||||||
|
{
|
||||||
|
if (now_seg == text_section)
|
||||||
|
{
|
||||||
|
char * str = input_line_pointer;
|
||||||
|
int size = 1;
|
||||||
|
int repeat;
|
||||||
|
|
||||||
|
repeat = atoi (str);
|
||||||
|
|
||||||
|
/* Look to see if a size has been specified. */
|
||||||
|
while (*str != '\n' && *str != 0 && *str != ',')
|
||||||
|
++ str;
|
||||||
|
|
||||||
|
if (* str == ',')
|
||||||
|
{
|
||||||
|
size = atoi (str + 1);
|
||||||
|
|
||||||
|
if (size > 8)
|
||||||
|
size = 8;
|
||||||
|
else if (size < 0)
|
||||||
|
size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
poolspan += size * repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
s_fill (unused);
|
||||||
|
|
||||||
|
check_literals (2, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle the section changing pseudo-ops. These call through to the
|
/* Handle the section changing pseudo-ops. These call through to the
|
||||||
normal implementations, but they dump the literal pool first. */
|
normal implementations, but they dump the literal pool first. */
|
||||||
|
|
||||||
@ -340,6 +376,21 @@ static void
|
|||||||
mcore_s_section (ignore)
|
mcore_s_section (ignore)
|
||||||
int ignore;
|
int ignore;
|
||||||
{
|
{
|
||||||
|
/* Scan forwards to find the name of the section. If the section
|
||||||
|
being switched to is ".line" then this is a DWARF1 debug section
|
||||||
|
which is arbitarily placed inside generated code. In this case
|
||||||
|
do not dump the literal pool because it is a) inefficient and
|
||||||
|
b) would require the generation of extra code to jump around the
|
||||||
|
pool. */
|
||||||
|
char * ilp = input_line_pointer;
|
||||||
|
|
||||||
|
while (*ilp != 0 && isspace(*ilp))
|
||||||
|
++ ilp;
|
||||||
|
|
||||||
|
if (strncmp (ilp, ".line", 5) == 0
|
||||||
|
&& (isspace (ilp[5]) || *ilp == '\n' || *ilp == '\r'))
|
||||||
|
;
|
||||||
|
else
|
||||||
dump_literals (0);
|
dump_literals (0);
|
||||||
|
|
||||||
#ifdef OBJ_ELF
|
#ifdef OBJ_ELF
|
||||||
@ -1466,7 +1517,7 @@ md_assemble (str)
|
|||||||
case JL:
|
case JL:
|
||||||
inst = MCORE_INST_JSRI; /* jsri */
|
inst = MCORE_INST_JSRI; /* jsri */
|
||||||
input_line_pointer = parse_rt (op_end + 1, & output, 1, & e);
|
input_line_pointer = parse_rt (op_end + 1, & output, 1, & e);
|
||||||
/* parse_rt() calls frag_more for us */
|
/* parse_rt() calls frag_more for us. */
|
||||||
|
|
||||||
/* Only do this if we know how to do it ... */
|
/* Only do this if we know how to do it ... */
|
||||||
if (e.X_op != O_absent && do_jsri2bsr)
|
if (e.X_op != O_absent && do_jsri2bsr)
|
||||||
@ -1725,7 +1776,7 @@ md_convert_frag (abfd, sec, fragP)
|
|||||||
case C (COND_JUMP, COND12):
|
case C (COND_JUMP, COND12):
|
||||||
case C (UNCD_JUMP, UNCD12):
|
case C (UNCD_JUMP, UNCD12):
|
||||||
{
|
{
|
||||||
/* Get the address of the end of the instruction */
|
/* Get the address of the end of the instruction. */
|
||||||
int next_inst = fragP->fr_fix + fragP->fr_address + 2;
|
int next_inst = fragP->fr_fix + fragP->fr_address + 2;
|
||||||
unsigned char t0;
|
unsigned char t0;
|
||||||
int disp = targ_addr - next_inst;
|
int disp = targ_addr - next_inst;
|
||||||
@ -1847,7 +1898,7 @@ md_convert_frag (abfd, sec, fragP)
|
|||||||
buffer[6] = 0;
|
buffer[6] = 0;
|
||||||
buffer[7] = 0;
|
buffer[7] = 0;
|
||||||
|
|
||||||
/* Make reloc for the long disp */
|
/* Make reloc for the long disp. */
|
||||||
fix_new (fragP, fragP->fr_fix + 4, 4,
|
fix_new (fragP, fragP->fr_fix + 4, 4,
|
||||||
fragP->fr_symbol, fragP->fr_offset, 0, BFD_RELOC_32);
|
fragP->fr_symbol, fragP->fr_offset, 0, BFD_RELOC_32);
|
||||||
|
|
||||||
@ -1861,7 +1912,7 @@ md_convert_frag (abfd, sec, fragP)
|
|||||||
buffer[4] = 0;
|
buffer[4] = 0;
|
||||||
buffer[5] = 0;
|
buffer[5] = 0;
|
||||||
|
|
||||||
/* Make reloc for the long disp */
|
/* Make reloc for the long disp. */
|
||||||
fix_new (fragP, fragP->fr_fix + 2, 4,
|
fix_new (fragP, fragP->fr_fix + 2, 4,
|
||||||
fragP->fr_symbol, fragP->fr_offset, 0, BFD_RELOC_32);
|
fragP->fr_symbol, fragP->fr_offset, 0, BFD_RELOC_32);
|
||||||
fragP->fr_fix += U32_LEN;
|
fragP->fr_fix += U32_LEN;
|
||||||
@ -2071,7 +2122,7 @@ md_estimate_size_before_relax (fragP, segment_type)
|
|||||||
return fragP->fr_var;
|
return fragP->fr_var;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Put number into target byte order */
|
/* Put number into target byte order. */
|
||||||
void
|
void
|
||||||
md_number_to_chars (ptr, use, nbytes)
|
md_number_to_chars (ptr, use, nbytes)
|
||||||
char * ptr;
|
char * ptr;
|
||||||
|
Reference in New Issue
Block a user