mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
* config/tc-alpha.c (alpha_reloc_op_tag): Replace need_seq with
require_seq and allow_seq. Let !literal omit the sequence number. (tokenize_arguments): Reject sequence numbers of !allow_seq.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2001-09-07 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* config/tc-alpha.c (alpha_reloc_op_tag): Replace need_seq with
|
||||||
|
require_seq and allow_seq. Let !literal omit the sequence number.
|
||||||
|
(tokenize_arguments): Reject sequence numbers of !allow_seq.
|
||||||
|
|
||||||
2001-09-08 Jakub Jelinek <jakub@redhat.com>
|
2001-09-08 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* config/tc-sparc.c (md_apply_fix3): Handle relocs against SEC_MERGE
|
* config/tc-sparc.c (md_apply_fix3): Handle relocs against SEC_MERGE
|
||||||
|
@ -479,25 +479,26 @@ static int alpha_flag_show_after_trunc = 0; /* -H */
|
|||||||
? (abort (), 0) \
|
? (abort (), 0) \
|
||||||
: (int) (op) - (int) O_literal) ])
|
: (int) (op) - (int) O_literal) ])
|
||||||
|
|
||||||
#define DEF(NAME, RELOC, NEED_SEQ) \
|
#define DEF(NAME, RELOC, REQ, ALLOW) \
|
||||||
{ #NAME, sizeof(#NAME)-1, O_##NAME, RELOC, NEED_SEQ }
|
{ #NAME, sizeof(#NAME)-1, O_##NAME, RELOC, REQ, ALLOW}
|
||||||
|
|
||||||
static const struct alpha_reloc_op_tag {
|
static const struct alpha_reloc_op_tag {
|
||||||
const char *name; /* string to lookup */
|
const char *name; /* string to lookup */
|
||||||
size_t length; /* size of the string */
|
size_t length; /* size of the string */
|
||||||
operatorT op; /* which operator to use */
|
operatorT op; /* which operator to use */
|
||||||
bfd_reloc_code_real_type reloc; /* relocation before frob */
|
bfd_reloc_code_real_type reloc; /* relocation before frob */
|
||||||
unsigned int need_seq : 1; /* require a sequence number */
|
unsigned int require_seq : 1; /* require a sequence number */
|
||||||
|
unsigned int allow_seq : 1; /* allow a sequence number */
|
||||||
} alpha_reloc_op[] = {
|
} alpha_reloc_op[] = {
|
||||||
DEF(literal, BFD_RELOC_ALPHA_ELF_LITERAL, 1),
|
DEF(literal, BFD_RELOC_ALPHA_ELF_LITERAL, 0, 1),
|
||||||
DEF(lituse_addr, DUMMY_RELOC_LITUSE_ADDR, 1),
|
DEF(lituse_addr, DUMMY_RELOC_LITUSE_ADDR, 1, 1),
|
||||||
DEF(lituse_base, DUMMY_RELOC_LITUSE_BASE, 1),
|
DEF(lituse_base, DUMMY_RELOC_LITUSE_BASE, 1, 1),
|
||||||
DEF(lituse_bytoff, DUMMY_RELOC_LITUSE_BYTOFF, 1),
|
DEF(lituse_bytoff, DUMMY_RELOC_LITUSE_BYTOFF, 1, 1),
|
||||||
DEF(lituse_jsr, DUMMY_RELOC_LITUSE_JSR, 1),
|
DEF(lituse_jsr, DUMMY_RELOC_LITUSE_JSR, 1, 1),
|
||||||
DEF(gpdisp, BFD_RELOC_ALPHA_GPDISP, 1),
|
DEF(gpdisp, BFD_RELOC_ALPHA_GPDISP, 1, 1),
|
||||||
DEF(gprelhigh, BFD_RELOC_ALPHA_GPREL_HI16, 0),
|
DEF(gprelhigh, BFD_RELOC_ALPHA_GPREL_HI16, 0, 0),
|
||||||
DEF(gprellow, BFD_RELOC_ALPHA_GPREL_LO16, 0),
|
DEF(gprellow, BFD_RELOC_ALPHA_GPREL_LO16, 0, 0),
|
||||||
DEF(gprel, BFD_RELOC_GPREL16, 0)
|
DEF(gprel, BFD_RELOC_GPREL16, 0, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef DEF
|
#undef DEF
|
||||||
@ -1874,29 +1875,32 @@ tokenize_arguments (str, tok, ntok)
|
|||||||
SKIP_WHITESPACE ();
|
SKIP_WHITESPACE ();
|
||||||
if (*input_line_pointer != '!')
|
if (*input_line_pointer != '!')
|
||||||
{
|
{
|
||||||
if (r->need_seq)
|
if (r->require_seq)
|
||||||
{
|
{
|
||||||
as_bad (_("No !sequence-number after !%s"),
|
as_bad (_("no sequence number after !%s"), p);
|
||||||
input_line_pointer);
|
|
||||||
goto err_report;
|
goto err_report;
|
||||||
}
|
}
|
||||||
|
|
||||||
tok->X_op = r->op;
|
|
||||||
tok->X_add_number = 0;
|
tok->X_add_number = 0;
|
||||||
reloc_found_p = 1;
|
|
||||||
++tok;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
input_line_pointer++;
|
|
||||||
|
|
||||||
/* Parse !sequence_number */
|
|
||||||
expression (tok);
|
|
||||||
if (tok->X_op != O_constant || tok->X_add_number <= 0)
|
|
||||||
{
|
{
|
||||||
as_bad (_("Bad sequence number: !%s!%s"),
|
if (! r->allow_seq)
|
||||||
r->name, input_line_pointer);
|
{
|
||||||
goto err_report;
|
as_bad (_("!%s does not use a sequence number"), p);
|
||||||
|
goto err_report;
|
||||||
|
}
|
||||||
|
|
||||||
|
input_line_pointer++;
|
||||||
|
|
||||||
|
/* Parse !sequence_number */
|
||||||
|
expression (tok);
|
||||||
|
if (tok->X_op != O_constant || tok->X_add_number <= 0)
|
||||||
|
{
|
||||||
|
as_bad (_("Bad sequence number: !%s!%s"),
|
||||||
|
r->name, input_line_pointer);
|
||||||
|
goto err_report;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tok->X_op = r->op;
|
tok->X_op = r->op;
|
||||||
|
Reference in New Issue
Block a user