From 2b4f075ada87521f86a61e93133a0ba1c247c322 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Wed, 3 Nov 2004 01:54:25 +0000 Subject: [PATCH] * symbols.c (colon) [!WORKING_DOT_WORD]: Don't declare md_short_jump_size, md_long_jump_size. * write.c [!WORKING_DOT_WORD]: Ditto. * tc.h [!WORKING_DOT_WORD]: Declare them here. Drop const qualifier. * config/tc-cris.h (md_short_jump_size, md_long_jump_size): Don't declare. * config/tc-cris.c (md_short_jump_size, md_long_jump_size): Drop const qualifier in these definitions. * config/tc-i370.c, config/tc-m68k.c, config/tc-pdp11.c, config/tc-s390.c, config/tc-tahoe.c, config/tc-vax.c: Ditto. --- gas/ChangeLog | 14 ++++++++++++++ gas/config/tc-cris.c | 4 ++-- gas/config/tc-cris.h | 3 --- gas/config/tc-i370.c | 4 ++-- gas/config/tc-m68k.c | 4 ++-- gas/config/tc-pdp11.c | 4 ++-- gas/config/tc-s390.c | 4 ++-- gas/config/tc-tahoe.c | 4 ++-- gas/config/tc-vax.c | 4 ++-- gas/symbols.c | 3 --- gas/tc.h | 4 ++++ gas/write.c | 5 ----- 12 files changed, 32 insertions(+), 25 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 11ada2e45de..22643dc0b03 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,17 @@ +2004-11-03 Hans-Peter Nilsson + + * symbols.c (colon) [!WORKING_DOT_WORD]: Don't declare + md_short_jump_size, md_long_jump_size. + * write.c [!WORKING_DOT_WORD]: Ditto. + * tc.h [!WORKING_DOT_WORD]: Declare them here. Drop const + qualifier. + * config/tc-cris.h (md_short_jump_size, md_long_jump_size): Don't + declare. + * config/tc-cris.c (md_short_jump_size, md_long_jump_size): Drop + const qualifier in these definitions. + * config/tc-i370.c, config/tc-m68k.c, config/tc-pdp11.c, + config/tc-s390.c, config/tc-tahoe.c, config/tc-vax.c: Ditto. + 2004-11-02 Nick Clifton * dwarf2dbg.c (dwarf2_finish): Check for the existence of a file diff --git a/gas/config/tc-cris.c b/gas/config/tc-cris.c index e725b8847b8..0f3d3c85652 100644 --- a/gas/config/tc-cris.c +++ b/gas/config/tc-cris.c @@ -341,8 +341,8 @@ const char *md_shortopts = "hHN"; Note that we can't add relocs, because relaxation uses these fixed numbers, and md_create_short_jump is called after relaxation. */ -const int md_short_jump_size = 6; -const int md_long_jump_size = 6; +int md_short_jump_size = 6; +int md_long_jump_size = 6; /* Report output format. Small changes in output format (like elf variants below) can happen until all options are parsed, but after diff --git a/gas/config/tc-cris.h b/gas/config/tc-cris.h index 9082a626276..4621501342c 100644 --- a/gas/config/tc-cris.h +++ b/gas/config/tc-cris.h @@ -65,9 +65,6 @@ extern const char FLT_CHARS[]; #define md_number_to_chars number_to_chars_littleendian -extern const int md_short_jump_size; -extern const int md_long_jump_size; - /* There's no use having different functions for this; the sizes are the same. Note that we can't #define md_short_jump_size here. */ #define md_create_short_jump md_create_long_jump diff --git a/gas/config/tc-i370.c b/gas/config/tc-i370.c index a1dab875ae8..ed39a3a399a 100644 --- a/gas/config/tc-i370.c +++ b/gas/config/tc-i370.c @@ -425,8 +425,8 @@ static enum { SHLIB_NONE, SHLIB_PIC, SHILB_MRELOCATABLE } shlib = SHLIB_NONE; static flagword i370_flags = 0; #ifndef WORKING_DOT_WORD -const int md_short_jump_size = 4; -const int md_long_jump_size = 4; +int md_short_jump_size = 4; +int md_long_jump_size = 4; #endif #ifdef OBJ_ELF diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 04baa6e6e3b..f0a87b3f09e 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -5128,8 +5128,8 @@ tc_aout_fix_to_chars (char *where, fixS *fixP, #endif /* OBJ_AOUT or OBJ_BOUT */ #ifndef WORKING_DOT_WORD -const int md_short_jump_size = 4; -const int md_long_jump_size = 6; +int md_short_jump_size = 4; +int md_long_jump_size = 6; void md_create_short_jump (char *ptr, addressT from_addr, addressT to_addr, diff --git a/gas/config/tc-pdp11.c b/gas/config/tc-pdp11.c index 4993fdd124a..405cc2414b9 100644 --- a/gas/config/tc-pdp11.c +++ b/gas/config/tc-pdp11.c @@ -1020,8 +1020,8 @@ md_convert_frag (headers, seg, fragP) { } -const int md_short_jump_size = 2; -const int md_long_jump_size = 4; +int md_short_jump_size = 2; +int md_long_jump_size = 4; void md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol) diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index 83b671d7bed..8bb96974be6 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -312,8 +312,8 @@ static flagword s390_flags = 0; symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */ #ifndef WORKING_DOT_WORD -const int md_short_jump_size = 4; -const int md_long_jump_size = 4; +int md_short_jump_size = 4; +int md_long_jump_size = 4; #endif const char *md_shortopts = "A:m:kVQ:"; diff --git a/gas/config/tc-tahoe.c b/gas/config/tc-tahoe.c index 4bc75ea2c72..b58306eeeaa 100644 --- a/gas/config/tc-tahoe.c +++ b/gas/config/tc-tahoe.c @@ -572,7 +572,7 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file) /* Relocate byte stuff */ /* This is for broken word. */ -const int md_short_jump_size = 3; +int md_short_jump_size = 3; void md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol) @@ -588,7 +588,7 @@ md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol) md_number_to_chars (ptr, offset, 2); } -const int md_long_jump_size = 6; +int md_long_jump_size = 6; const int md_reloc_size = 8; /* Size of relocation record */ void diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c index 1e1c1282aa0..ea7d1d6ed7c 100644 --- a/gas/config/tc-vax.c +++ b/gas/config/tc-vax.c @@ -3214,8 +3214,8 @@ mumble (text, value) /* end: vip_op.c */ -const int md_short_jump_size = 3; -const int md_long_jump_size = 6; +int md_short_jump_size = 3; +int md_long_jump_size = 6; const int md_reloc_size = 8; /* Size of relocation record */ void diff --git a/gas/symbols.c b/gas/symbols.c index 8caaf4a441e..045241600b8 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -299,9 +299,6 @@ colon (/* Just seen "x:" - rattle symbols & frags. */ fragS *frag_tmp; char *frag_opcode; - extern const int md_short_jump_size; - extern const int md_long_jump_size; - if (now_seg == absolute_section) { as_bad (_("cannot define symbol `%s' in absolute section"), sym_name); diff --git a/gas/tc.h b/gas/tc.h index ef896ed6c4e..2f77c5f583d 100644 --- a/gas/tc.h +++ b/gas/tc.h @@ -54,6 +54,10 @@ void md_begin (void); void md_number_to_chars (char *, valueT, int); void md_apply_fix3 (fixS *, valueT *, segT); +#ifndef WORKING_DOT_WORD +extern int md_short_jump_size; +extern int md_long_jump_size; +#endif #ifndef md_create_long_jump void md_create_long_jump (char *, addressT, addressT, fragS *, symbolS *); diff --git a/gas/write.c b/gas/write.c index a713a9d3981..6ca35f225f1 100644 --- a/gas/write.c +++ b/gas/write.c @@ -97,11 +97,6 @@ #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from (FIX) #endif -#ifndef WORKING_DOT_WORD -extern const int md_short_jump_size; -extern const int md_long_jump_size; -#endif - /* Used to control final evaluation of expressions. */ int finalize_syms = 0; -- 2.30.2