summaryrefslogtreecommitdiff
path: root/bfd/mmo.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2002-02-01 08:18:56 +0000
committerHans-Peter Nilsson <hp@axis.com>2002-02-01 08:18:56 +0000
commit2bb01baa8af3fb1caf0dd6b0dd121b27009a5ef2 (patch)
tree1458ac16e66545253e7e41544afb7414a4fe2790 /bfd/mmo.c
parentb5fb565bdcb2af8d77b19823e3f792fc6de5b3f1 (diff)
downloadgdb-2bb01baa8af3fb1caf0dd6b0dd121b27009a5ef2.tar.gz
Perform on-demand global register allocation from
R_MMIX_BASE_PLUS_OFFSET relocs. * elf64-mmix.c (struct bpo_reloc_section_info, struct bpo_reloc_request, struct bpo_greg_section_info): New. (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook, bpo_reloc_request_sort_fn, mmix_elf_relax_section, _bfd_mmix_check_all_relocs, _bfd_mmix_prepare_linker_allocated_gregs, _bfd_mmix_finalize_linker_allocated_gregs): New functions. (elf_mmix_howto_table): Correct src_mask for most relocs. (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New case. (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New case. Fix typo in comment. New label do_mmix_reloc. (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to store first object file with a base-plus-offset reloc. Call mmix_elf_check_common_relocs for the part common with mmo. (mmix_elf_final_link): Write out linker-allocated register contents section. (elf_backend_gc_sweep_hook): Define. (bfd_elf64_bfd_relax_section): Define. * mmo.c: Don't include <ctype.h> (mmo_init): Correct init-once logic.
Diffstat (limited to 'bfd/mmo.c')
-rw-r--r--bfd/mmo.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 019160c3386..ae7c42c4b45 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -201,7 +201,6 @@ EXAMPLE
#include "libiberty.h"
#include "elf/mmix.h"
#include "opcode/mmix.h"
-#include <ctype.h>
#define LOP 0x98
#define LOP_QUOTE 0
@@ -481,10 +480,9 @@ mmo_init ()
static const char letters[]
= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:_";
- if (inited == false)
- {
- inited = true;
- }
+ if (inited == true)
+ return;
+ inited = true;
/* Fill in the set of valid symbol characters. */
strcpy (valid_mmo_symbol_character_set, letters);