Fri Apr 22 11:14:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+ * nlmconv.c (setup_sections): Remove special handling of .reginfo
+ section.
+ (copy_sections): Likewise.
+ (alpha_mangle_relocs): Use bfd_ecoff_get_gp_value rather than the
+ special ECOFF .reginfo section.
+
* objcopy.c (copy_object): Call bfd_copy_private_bfd_data after
copying everything else, to let it fiddle with the file in its
final state.
bfd_size_type add;
bfd_size_type secsecsize;
- /* FIXME: We don't want to copy the .reginfo section of an ECOFF
- file. However, I don't have a good way to describe this section.
- We do want to copy the section when using objcopy. */
- if (bfd_get_flavour (inbfd) == bfd_target_ecoff_flavour
- && strcmp (bfd_section_name (inbfd, insec), ".reginfo") == 0)
- return;
-
f = bfd_get_section_flags (inbfd, insec);
if (f & SEC_CODE)
outname = NLM_CODE_NAME;
inname = bfd_section_name (inbfd, insec);
- /* FIXME: We don't want to copy the .reginfo section of an ECOFF
- file. However, I don't have a good way to describe this section.
- We do want to copy the section when using objcopy. */
- if (bfd_get_flavour (inbfd) == bfd_target_ecoff_flavour
- && strcmp (inname, ".reginfo") == 0)
- return;
-
outsec = insec->output_section;
assert (outsec != NULL);
++(*reloc_count_ptr);
}
- /* Get the GP value from bfd. It is in the .reginfo section. */
+ /* Get the GP value from bfd. */
if (nlm_alpha_backend_data (outbfd)->gp == 0)
- {
- bfd *inbfd;
- asection *reginfo_sec;
- struct ecoff_reginfo sreginfo;
-
- inbfd = insec->owner;
- assert (bfd_get_flavour (inbfd) == bfd_target_ecoff_flavour);
- reginfo_sec = bfd_get_section_by_name (inbfd, REGINFO);
- if (reginfo_sec != (asection *) NULL
- && bfd_get_section_contents (inbfd, reginfo_sec,
- (PTR) &sreginfo, (file_ptr) 0,
- sizeof sreginfo) != false)
- nlm_alpha_backend_data (outbfd)->gp = sreginfo.gp_value;
- }
+ nlm_alpha_backend_data (outbfd)->gp =
+ bfd_ecoff_get_gp_value (insec->owner);
*relocs = (arelent *) xmalloc (sizeof (arelent));
(*relocs)->sym_ptr_ptr = bfd_abs_section.symbol_ptr_ptr;