- stub_name = (bfd_elf_string_from_elf_section
- (input_bfd, symtab_hdr->sh_link,
- sym->st_name));
- sym_value = sym->st_value;
- hash = NULL;
- }
- else
- {
- /* It's an external symbol. */
- int e_indx;
-
- e_indx = r_indx - symtab_hdr->sh_info;
- hash = (struct elf_link_hash_entry *)
- (sym_hashes[e_indx]);
-
- while (hash->root.type == bfd_link_hash_indirect
- || hash->root.type == bfd_link_hash_warning)
- hash = ((struct elf_link_hash_entry *)
- hash->root.u.i.link);
-
- if (hash->root.type == bfd_link_hash_defined
- || hash->root.type == bfd_link_hash_defweak
- || hash->root.type == bfd_link_hash_new)
- {
- if (!(hash->other & STO_M68HC12_FAR))
- continue;
- }
- else if (hash->root.type == bfd_link_hash_undefweak)
- {
- continue;
- }
- else if (hash->root.type == bfd_link_hash_undefined)
- {
- continue;
- }
- else
- {
- bfd_set_error (bfd_error_bad_value);
- goto error_ret_free_internal;
- }
- sym_sec = hash->root.u.def.section;
- sym_value = hash->root.u.def.value;
- stub_name = hash->root.root.string;
- }
-
- if (!stub_name)
- goto error_ret_free_internal;
-
- stub_entry = m68hc12_stub_hash_lookup
- (htab->stub_hash_table,
- stub_name,
- FALSE, FALSE);
- if (stub_entry == NULL)
- {
- if (add_stub_section == 0)
- continue;
-
- stub_entry = m68hc12_add_stub (stub_name, section, htab);
- if (stub_entry == NULL)
- {
- error_ret_free_internal:
- if (elf_section_data (section)->relocs == NULL)
- free (internal_relocs);
- goto error_ret_free_local;
- }
- }
-
- stub_entry->target_value = sym_value;
- stub_entry->target_section = sym_sec;
- }
-
- /* We're done with the internal relocs, free them. */
- if (elf_section_data (section)->relocs == NULL)
- free (internal_relocs);
- }
+ stub_name = (bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link,
+ sym->st_name));
+ sym_value = sym->st_value;
+ hash = NULL;
+ }
+ else
+ {
+ /* It's an external symbol. */
+ int e_indx;
+
+ e_indx = r_indx - symtab_hdr->sh_info;
+ hash = (struct elf_link_hash_entry *)
+ (sym_hashes[e_indx]);
+
+ while (hash->root.type == bfd_link_hash_indirect
+ || hash->root.type == bfd_link_hash_warning)
+ hash = ((struct elf_link_hash_entry *)
+ hash->root.u.i.link);
+
+ if (hash->root.type == bfd_link_hash_defined
+ || hash->root.type == bfd_link_hash_defweak
+ || hash->root.type == bfd_link_hash_new)
+ {
+ if (!(hash->other & STO_M68HC12_FAR))
+ continue;
+ }
+ else if (hash->root.type == bfd_link_hash_undefweak)
+ {
+ continue;
+ }
+ else if (hash->root.type == bfd_link_hash_undefined)
+ {
+ continue;
+ }
+ else
+ {
+ bfd_set_error (bfd_error_bad_value);
+ goto error_ret_free_internal;
+ }
+ sym_sec = hash->root.u.def.section;
+ sym_value = hash->root.u.def.value;
+ stub_name = hash->root.root.string;
+ }
+
+ if (!stub_name)
+ goto error_ret_free_internal;
+
+ stub_entry = m68hc12_stub_hash_lookup
+ (htab->stub_hash_table,
+ stub_name,
+ FALSE, FALSE);
+ if (stub_entry == NULL)
+ {
+ if (add_stub_section == 0)
+ continue;
+
+ stub_entry = m68hc12_add_stub (stub_name, section, htab);
+ if (stub_entry == NULL)
+ {
+ error_ret_free_internal:
+ if (elf_section_data (section)->relocs == NULL)
+ free (internal_relocs);
+ goto error_ret_free_local;
+ }
+ }
+
+ stub_entry->target_value = sym_value;
+ stub_entry->target_section = sym_sec;
+ }
+
+ /* We're done with the internal relocs, free them. */
+ if (elf_section_data (section)->relocs == NULL)
+ free (internal_relocs);
+ }