bfd_vma text_segment_base;
bfd_vma data_segment_base;
- /* Hash entry for __text_seg. */
+ /* Hash entries for __text_seg and __data_seg. */
struct elf_link_hash_entry *text_segment;
+ struct elf_link_hash_entry *data_segment;
/* We build tables to map from an input section back to its
symbol index. This is the BFD for which we currently have
return false;
}
- /* Add __text_seg symbol to dynamic table. */
- if (bfd_link_pic (x->info) && !hppa_info->text_segment)
- {
- struct elf_link_hash_entry *nh;
-
- nh = elf_link_hash_lookup (elf_hash_table (x->info),
- "__text_seg", true, false, false);
- if (nh != NULL)
- {
- asection *s;
-
- s = bfd_get_section_by_name (x->info->output_bfd,
- ".dynamic");
-
- nh->type = STT_SECTION;
- nh->root.type = bfd_link_hash_defined;
- nh->root.u.def.value = 0;
- nh->root.u.def.section = s;
- nh->forced_local = 1;
- nh->other = STV_DEFAULT;
- bfd_elf_link_record_dynamic_symbol (x->info, nh);
- hppa_info->text_segment = nh;
- }
- }
-
hh->opd_offset = x->ofs;
x->ofs += OPD_ENTRY_SIZE;
}
}
}
+ /* Add __text_seg section symbol to dynamic table. */
+ if (bfd_link_pic (info) && !hppa_info->text_segment)
+ {
+ struct elf_link_hash_entry *nh;
+
+ nh = elf_link_hash_lookup (elf_hash_table (info),
+ "__text_seg", true, false, false);
+ if (nh != NULL)
+ {
+ asection *s;
+
+ s = bfd_get_section_by_name (info->output_bfd, ".dynamic");
+
+ nh->type = STT_SECTION;
+ nh->root.type = bfd_link_hash_defined;
+ nh->root.u.def.value = 0;
+ nh->root.u.def.section = s;
+ nh->forced_local = 1;
+ nh->other = STV_DEFAULT;
+ bfd_elf_link_record_dynamic_symbol (info, nh);
+ hppa_info->text_segment = nh;
+ }
+ }
+
+ /* Add __data_seg section symbol to dynamic table. */
+ if (bfd_link_pic (info) && !hppa_info->data_segment)
+ {
+ struct elf_link_hash_entry *nh;
+
+ nh = elf_link_hash_lookup (elf_hash_table (info),
+ "__data_seg", true, false, false);
+ if (nh != NULL)
+ {
+ asection *s;
+
+ s = bfd_get_section_by_name (info->output_bfd, ".data");
+
+ nh->type = STT_SECTION;
+ nh->root.type = bfd_link_hash_defined;
+ nh->root.u.def.value = 0;
+ nh->root.u.def.section = s;
+ nh->forced_local = 1;
+ nh->other = STV_DEFAULT;
+ bfd_elf_link_record_dynamic_symbol (info, nh);
+ hppa_info->data_segment = nh;
+ }
+ }
+
/* Allocate the GOT entries. */
data.info = info;