aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-09-12 22:16:27 +0000
committerIan Lance Taylor <ian@airs.com>1994-09-12 22:16:27 +0000
commit3c9832f89fe30154f1c18cef114363c2856af21d (patch)
tree9680fcfdc4e973b05579bb731217de01013212d4 /bfd
parentc1444ec48f5d93e491a8f5e13c11531fb4d2cbf8 (diff)
downloadgdb-3c9832f89fe30154f1c18cef114363c2856af21d.zip
gdb-3c9832f89fe30154f1c18cef114363c2856af21d.tar.gz
gdb-3c9832f89fe30154f1c18cef114363c2856af21d.tar.bz2
* elfcode.h (swap_out_syms): Set the type of an undefined symbol
to STT_FUNC if the BSF_FUNCTION flag is set.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elfcode.h14
2 files changed, 15 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5a431aa..a070a04 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,12 @@
Mon Sep 12 11:43:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+ * coff-alpha.c (ecoffalpha_little_vec): Add SEC_CODE and SEC_DATA
+ to section_flags.
+ * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
+
+ * elfcode.h (swap_out_syms): Set the type of an undefined symbol
+ to STT_FUNC if the BSF_FUNCTION flag is set.
+
* cofflink.c (coff_link_input_bfd): If r_symndx is -1, don't
change it.
(_bfd_coff_generic_relocate_section): If r_symndx is -1, it is an
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 78ae323..2ba4856 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -2347,7 +2347,10 @@ swap_out_syms (abfd)
if (bfd_is_com_section (syms[idx]->section))
sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_OBJECT);
else if (bfd_is_und_section (syms[idx]->section))
- sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_NOTYPE);
+ sym.st_info = ELF_ST_INFO (STB_GLOBAL,
+ ((syms[idx]->flags & BSF_FUNCTION)
+ ? STT_FUNC
+ : STT_NOTYPE));
else if (syms[idx]->flags & BSF_SECTION_SYM)
sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
else if (syms[idx]->flags & BSF_FILE)
@@ -2511,7 +2514,8 @@ NAME(bfd_elf,write_object_contents) (abfd)
}
if (bed->elf_backend_final_write_processing)
- (*bed->elf_backend_final_write_processing) (abfd, NULL);
+ (*bed->elf_backend_final_write_processing) (abfd,
+ elf_tdata (abfd)->linker);
return write_shdrs_and_ehdr (abfd);
}
@@ -5682,10 +5686,6 @@ elf_bfd_final_link (abfd, info)
}
}
- /* Now backend stuff. */
- if (bed->elf_backend_final_write_processing)
- (*bed->elf_backend_final_write_processing) (abfd, NULL);
-
if (finfo.contents != NULL)
free (finfo.contents);
if (finfo.external_relocs != NULL)
@@ -5709,6 +5709,8 @@ elf_bfd_final_link (abfd, info)
free (elf_section_data (o)->rel_hashes);
}
+ elf_tdata (abfd)->linker = true;
+
return true;
error_return: