From: Ken Raeburn Date: Tue, 11 Apr 1995 06:10:34 +0000 (+0000) Subject: write.c: Complain about .space or .org moving backwards. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=9b0da28b13c6a9a22090d7ce8946210b7b65926f;p=deliverable%2Fbinutils-gdb.git write.c: Complain about .space or .org moving backwards. Do generic rs_machine_dependent relaxation only if TC_GENERIC_RELAX_TABLE is defined. Use its value as the base of the table, so the actual declaration can be cpu-specific (and const or not as appropriate). For other cpus where this isn't done (the majority), delete md_relax_table altogether. For machines with WORKING_DOT_WORD, delete md_{short,long}_jump_size. --- diff --git a/gas/config/tc-a29k.c b/gas/config/tc-a29k.c index 41d9277e3d..286b73b60e 100644 --- a/gas/config/tc-a29k.c +++ b/gas/config/tc-a29k.c @@ -32,11 +32,6 @@ #define machine_ip a29k_ip #define machine_it a29k_it -const relax_typeS md_relax_table[] = -{ - { 0, 0, 0, 0 } -}; - #define IMMEDIATE_BIT 0x01000000 /* Turns RB into Immediate */ #define ABSOLUTE_BIT 0x01000000 /* Turns PC-relative to Absolute */ #define CE_BIT 0x00800000 /* Coprocessor enable in LOAD */ diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c index c8f216bb3f..1fe8f5c785 100644 --- a/gas/config/tc-arc.c +++ b/gas/config/tc-arc.c @@ -49,9 +49,6 @@ const pseudo_typeS md_pseudo_table[] = { NULL, 0, 0 }, }; -const int md_short_jump_size = 4; -const int md_long_jump_size = 4; - /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful */ const char comment_chars[] = "#;"; @@ -1009,11 +1006,6 @@ md_estimate_size_before_relax (fragp, seg) abort (); } -const relax_typeS md_relax_table[] = -{ - { 0 } -}; - /* Convert a machine dependent frag. We never generate these. */ void diff --git a/gas/config/tc-h8500.c b/gas/config/tc-h8500.c index feb08ad846..7b4568073c 100644 --- a/gas/config/tc-h8500.c +++ b/gas/config/tc-h8500.c @@ -87,7 +87,7 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP"; #define WORD_F 32767 #define WORD_B 32768 -const relax_typeS md_relax_table[C (END, 0)]; +relax_typeS md_relax_table[C (END, 0)]; static struct hash_control *opcode_hash_control; /* Opcode mnemonics */ diff --git a/gas/config/tc-h8500.h b/gas/config/tc-h8500.h index ebca8ab556..551c9ea33a 100644 --- a/gas/config/tc-h8500.h +++ b/gas/config/tc-h8500.h @@ -41,4 +41,7 @@ #define md_operand(x) +extern struct relax_type md_relax_table[]; +#define TC_GENERIC_RELAX_TABLE md_relax_table + /* end of tc-h8500.h */ diff --git a/gas/config/tc-m88k.c b/gas/config/tc-m88k.c index abbc11822c..2ee9c3f0e9 100644 --- a/gas/config/tc-m88k.c +++ b/gas/config/tc-m88k.c @@ -1168,9 +1168,6 @@ md_estimate_size_before_relax (fragP, segment_type) return (-1); } -const relax_typeS md_relax_table[] = -{0}; - #if 0 /* As far as I can tell, this routine is never called. What is it diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index f21096d482..09c997bd10 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -252,6 +252,7 @@ md_parse_option (c, arg) Motorola PowerPC 603/604. */ else if (strcmp (arg, "ppc") == 0 || strcmp (arg, "ppc32") == 0 + || strcmp (arg, "403") == 0 || strcmp (arg, "603") == 0 || strcmp (arg, "604") == 0) ppc_cpu = PPC_OPCODE_PPC; @@ -306,7 +307,7 @@ PowerPC options:\n\ -mpwrx generate code for IBM POWER/2 (RIOS2)\n\ -mpwr generate code for IBM POWER (RIOS1)\n\ -m601 generate code for Motorola PowerPC 601\n\ --mppc, -mppc32, -m603, -m604\n\ +-mppc, -mppc32, -m403, -m603, -m604\n\ generate code for Motorola PowerPC 603/604\n\ -many generate code for any architecture (PWR/PWRX/PPC)\n"); #ifdef OBJ_ELF @@ -592,6 +593,8 @@ ppc_elf_validate_fix (fixS *fixp, segT seg) && !fixp->fx_pcrel && fixp->fx_r_type <= BFD_RELOC_UNUSED && strcmp (segment_name (seg), ".got2") != 0 + && strcmp (segment_name (seg), ".dtors") != 0 + && strcmp (segment_name (seg), ".ctors") != 0 && strcmp (segment_name (seg), ".stab") != 0) { as_warn_where (fixp->fx_file, fixp->fx_line, @@ -2371,11 +2374,6 @@ md_estimate_size_before_relax (fragp, seg) abort (); } -const relax_typeS md_relax_table[] = -{ - { 0 } -}; - /* Convert a machine dependent frag. We never generate these. */ void diff --git a/gas/config/tc-rce.h b/gas/config/tc-rce.h index da367378b5..0b90c13923 100644 --- a/gas/config/tc-rce.h +++ b/gas/config/tc-rce.h @@ -53,4 +53,7 @@ #define md_operand(x) +extern const struct relax_type md_relax_table[]; +#define TC_GENERIC_RELAX_TABLE md_relax_table + #endif diff --git a/gas/config/tc-tahoe.c b/gas/config/tc-tahoe.c index 1e2006d1f8..b9be45ade2 100644 --- a/gas/config/tc-tahoe.c +++ b/gas/config/tc-tahoe.c @@ -247,8 +247,7 @@ pc_rel_disp? That sort of thing.) */ /* This is the table used by gas to figure out relaxing modes. The fields are forward_branch reach, backward_branch reach, number of bytes it would take, where the next biggest branch is. */ -const relax_typeS - md_relax_table[] = +const relax_typeS md_relax_table[] = { { 1, 1, 0, 0 diff --git a/gas/config/tc-tahoe.h b/gas/config/tc-tahoe.h index b355772c13..9e95986565 100644 --- a/gas/config/tc-tahoe.h +++ b/gas/config/tc-tahoe.h @@ -28,6 +28,9 @@ #define md_operand(x) +extern const struct relax_type md_relax_table[]; +#define TC_GENERIC_RELAX_TABLE md_relax_table + /* * Local Variables: * comment-column: 0 diff --git a/gas/config/tc-w65.c b/gas/config/tc-w65.c index c98d92fef6..bd802e5e49 100644 --- a/gas/config/tc-w65.c +++ b/gas/config/tc-w65.c @@ -108,7 +108,7 @@ int X; /* X flag */ #define WORD_F 32767 #define WORD_B 32768 -const relax_typeS md_relax_table[C (END, 0)]; +relax_typeS md_relax_table[C (END, 0)]; /* This function is called once, at assembler startup time. This should diff --git a/gas/config/tc-w65.h b/gas/config/tc-w65.h index 7622326871..969fa095fe 100644 --- a/gas/config/tc-w65.h +++ b/gas/config/tc-w65.h @@ -46,4 +46,7 @@ int tc_cons_reloc; #define md_operand(x) +extern struct relax_type md_relax_table[]; +#define TC_GENERIC_RELAX_TABLE md_relax_table + /* end of tc-w65.h */