Fri Sep 25 11:08:01 1992 Steve Chamberlain (sac@thepub.cygnus.com)

Added initial support for the z8k
	* z8ksim.em, z8ksim.sc-sh, z8ksim.sh: new files
	* configure.in, Makefile.in: modified to reflect above

	* ldlang.c (lang_check): when linking conflicting architectures,
	make the output file reflect at least one of the bad inputs.
This commit is contained in:
Steve Chamberlain
1992-09-25 18:11:04 +00:00
parent f4e5603151
commit 22a78f0d96
7 changed files with 180 additions and 24 deletions

View File

@@ -1846,34 +1846,44 @@ static void
DEFUN_VOID (lang_finish)
{
ldsym_type *lgs;
int warn = 1;
if (entry_symbol == (char *) NULL)
{
/* No entry has been specified, look for start */
entry_symbol = "start";
}
{
/* No entry has been specified, look for start, but don't warn */
entry_symbol = "start";
warn =0;
}
lgs = ldsym_get_soft (entry_symbol);
if (lgs && lgs->sdefs_chain)
{
asymbol *sy = *(lgs->sdefs_chain);
{
asymbol *sy = *(lgs->sdefs_chain);
/* We can set the entry address*/
bfd_set_start_address (output_bfd,
outside_symbol_address (sy));
/* We can set the entry address*/
bfd_set_start_address (output_bfd,
outside_symbol_address (sy));
}
}
else
{
/* Can't find anything reasonable,
use the first address in the text section
*/
asection *ts = bfd_get_section_by_name (output_bfd, ".text");
if (ts)
{
/* Can't find anything reasonable,
use the first address in the text section
*/
asection *ts = bfd_get_section_by_name (output_bfd, ".text");
if (warn)
einfo ("%P: Warning, can't find entry symbol %s, defaulting to %V\n",
entry_symbol, ts->vma);
if (ts)
{
bfd_set_start_address (output_bfd, ts->vma);
}
bfd_set_start_address (output_bfd, ts->vma);
}
else
{
if (warn)
einfo ("%P: Warning, can't find entry symbol %s, not setting start address\n",
entry_symbol);
}
}
}
/* By now we know the target architecture, and we may have an */
@@ -1905,7 +1915,7 @@ DEFUN_VOID (lang_check)
compatible = bfd_arch_get_compatible (input_bfd,
output_bfd);
if (compatible)
{
ldfile_output_machine = compatible->mach;
@@ -1919,8 +1929,8 @@ DEFUN_VOID (lang_check)
bfd_printable_name (output_bfd));
bfd_set_arch_mach (output_bfd,
ldfile_new_output_architecture,
ldfile_new_output_machine);
input_architecture,
input_machine);
}
}