+ return stub_changed;
+}
+
+/* Determine and set the size of the stub section for a final link.
+
+ The basic idea here is to examine all the relocations looking for
+ PC-relative calls to a target that is unreachable with a "bl"
+ instruction. */
+
+boolean
+elf32_hppa_size_stubs (output_bfd, stub_bfd, info, multi_subspace, group_size,
+ add_stub_section, layout_sections_again)
+ bfd *output_bfd;
+ bfd *stub_bfd;
+ struct bfd_link_info *info;
+ boolean multi_subspace;
+ bfd_signed_vma group_size;
+ asection * (*add_stub_section) PARAMS ((const char *, asection *));
+ void (*layout_sections_again) PARAMS ((void));
+{
+ bfd_size_type stub_group_size;
+ boolean stubs_always_before_branch;
+ boolean stub_changed;
+ boolean ret = 0;
+ struct elf32_hppa_link_hash_table *htab = hppa_link_hash_table (info);
+
+ /* Stash our params away. */
+ htab->stub_bfd = stub_bfd;
+ htab->multi_subspace = multi_subspace;
+ htab->add_stub_section = add_stub_section;
+ htab->layout_sections_again = layout_sections_again;
+ stubs_always_before_branch = group_size < 0;
+ if (group_size < 0)
+ stub_group_size = -group_size;
+ else
+ stub_group_size = group_size;
+ if (stub_group_size == 1)
+ {
+ /* Default values. */
+ stub_group_size = 7680000;
+ if (htab->has_17bit_branch || htab->multi_subspace)
+ stub_group_size = 240000;
+ if (htab->has_12bit_branch)
+ stub_group_size = 7500;
+ }
+
+ group_sections (htab, stub_group_size, stubs_always_before_branch);
+
+ switch (get_local_syms (output_bfd, info->input_bfds, info))
+ {
+ default:
+ if (htab->all_local_syms)
+ goto error_ret_free_local;
+ return false;
+
+ case 0:
+ stub_changed = false;
+ break;
+
+ case 1:
+ stub_changed = true;
+ break;
+ }
+