This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Committed, MMIX: Remove dead code.
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 23 Oct 2002 01:27:21 -0400 (EDT)
- Subject: Committed, MMIX: Remove dead code.
Note the "return" on the first line in mmix_frob_file_before_adjust.
I don't remember what problem I tried to solve here :-( but apparently I
used some other measure. If anything is left to do it ain't covered in
the test-suite, so the code goes. Sorry about that.
* config/tc-mmix.h (mmix_frob_file_before_adjust): Don't declare.
(tc_frob_file_before_adjust): Don't define.
* config/tc-mmix.c (mmix_frob_local_reloc): Remove unused
function.
(mmix_frob_file_before_adjust): Remove ineffective function.
Index: tc-mmix.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mmix.c,v
retrieving revision 1.9
diff -p -c -r1.9 tc-mmix.c
*** tc-mmix.c 5 Sep 2002 00:01:18 -0000 1.9
--- tc-mmix.c 23 Oct 2002 05:10:37 -0000
*************** static void mmix_handle_rest_of_empty_li
*** 67,73 ****
static void mmix_discard_rest_of_line PARAMS ((void));
static void mmix_byte PARAMS ((void));
static void mmix_cons PARAMS ((int));
- static void mmix_frob_local_reloc PARAMS ((bfd *, asection *, PTR));
/* Continue the tradition of symbols.c; use control characters to enforce
magic. These are used when replacing e.g. 8F and 8B so we can handle
--- 67,72 ----
*************** mmix_parse_predefined_name (name, expP)
*** 3757,3806 ****
expP->X_op_symbol = NULL;
return 1;
- }
-
- /* Worker for mmix_frob_file_before_adjust. */
-
- static void
- mmix_frob_local_reloc (abfd, sec, xxx)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- PTR xxx ATTRIBUTE_UNUSED;
- {
- segment_info_type *seginfo = seg_info (sec);
- fixS *fixp;
-
- if (seginfo == NULL)
- return;
-
- for (fixp = seginfo->fix_root; fixp; fixp = fixp->fx_next)
- if (! fixp->fx_done && fixp->fx_addsy != NULL)
- {
- symbolS *sym = fixp->fx_addsy;
- asection *section = S_GET_SEGMENT (sym);
-
- if (section == reg_section
- && fixp->fx_r_type == BFD_RELOC_MMIX_LOCAL)
- {
- /* If the register is marked global, we don't need to replace
- with the *real* register section since that will be done
- when the symbol is changed. */
- if (! S_IS_EXTERNAL (sym))
- /* If it's a local symbol, we replace it with an anonymous
- one with the same constant value. */
- fixp->fx_addsy = expr_build_uconstant (S_GET_VALUE (sym));
- }
- }
- }
-
- /* Change fixups for register symbols for BFD_MMIX_LOCAL to be for an
- absolute symbol. */
-
- void
- mmix_frob_file_before_adjust ()
- {
- return;
- bfd_map_over_sections (stdoutput, mmix_frob_local_reloc, (char *) 0);
}
/* Just check that we don't have a BSPEC/ESPEC pair active when changing
--- 3756,3761 ----
Index: tc-mmix.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mmix.h,v
retrieving revision 1.5
diff -p -c -r1.5 tc-mmix.h
*** tc-mmix.h 5 Sep 2002 00:01:18 -0000 1.5
--- tc-mmix.h 23 Oct 2002 05:10:37 -0000
*************** extern void mmix_frob_file PARAMS ((void
*** 199,207 ****
struct mmix_symbol_gregs;
#define TC_SYMFIELD_TYPE struct mmix_symbol_gregs *
- extern void mmix_frob_file_before_adjust PARAMS ((void));
- #define tc_frob_file_before_adjust mmix_frob_file_before_adjust
-
extern void mmix_md_elf_section_change_hook PARAMS ((void));
#define md_elf_section_change_hook mmix_md_elf_section_change_hook
--- 199,204 ----
brgds, H-P