+Fri Jan 14 16:45:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (elf_object_p): If there is a SHT_DYNAMIC section, set
+ the DYNAMIC flag for the BFD.
+ (NAME(bfd_elf,write_object_contents)): Don't try to write out a
+ BFD with the DYNAMIC flag set, since we don't generate the program
+ header table correctly.
+
+Fri Jan 14 01:04:36 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * elfcode.h (elf_slurp_symbol_table): Free x_symp at the end
+ of the function to avoid storage leak.
+
Thu Jan 13 23:07:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* ecoff.c (ecoff_link_write_external): An ifd can be -1.
goto got_system_call_error;
elf_swap_shdr_in (abfd, &x_shdr, i_shdrp + shindex);
elf_elfsections(abfd)[shindex] = i_shdrp + shindex;
+
+ /* If this is a .dynamic section, mark the object file as being
+ dynamically linked. */
+ if (i_shdrp[shindex].sh_type == SHT_DYNAMIC)
+ abfd->flags |= DYNAMIC;
}
if (i_ehdrp->e_shstrndx)
{
int idx;
int use_rela_p = get_elf_backend_data (abfd)->use_rela_p;
asymbol *last_sym = 0;
- int last_sym_idx;
+ int last_sym_idx = 9999999; /* should always be written before use */
if ((sec->flags & SEC_RELOC) == 0)
return;
}
if (bfd_is_com_section (syms[idx]->section))
- sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_NOTYPE);
+ sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_OBJECT);
else if (syms[idx]->section == &bfd_und_section)
sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_NOTYPE);
else if (syms[idx]->flags & BSF_SECTION_SYM)
Elf_Internal_Shdr **i_shdrp;
int count;
+ /* We don't know how to write dynamic objects. Specifically, we
+ don't know how to construct the program header. */
+ if ((abfd->flags & DYNAMIC) != 0)
+ {
+ fprintf (stderr, "Writing ELF dynamic objects is not supported\n");
+ bfd_error = wrong_format;
+ return false;
+ }
+
if (abfd->output_has_begun == false)
{
prep_headers (abfd);
to be prepared to read both (and merge them) or ensure that we
only read the full symbol table. Currently we only get called to
read the full symbol table. -fnf */
- if (bfd_get_outsymbols (abfd) != NULL)
- {
- return true;
- }
/* Read each raw ELF symbol, converting from external ELF form to
internal ELF form, and then using the information to create a
*symptrs = 0; /* Final null pointer */
}
+ free ((PTR) x_symp);
return true;
}