* configure.in: Fixed typo. Also, a fix for hp300bsd.

* ldlang.c (init_os):  Compensate for BFD change,
	where bfd_make_section now returns NULL for a duplicate
	section request, instead of the old section.
This commit is contained in:
Per Bothner
1991-11-03 23:03:01 +00:00
parent b27d204648
commit aeedc30e25
3 changed files with 24 additions and 7 deletions

View File

@ -1,3 +1,14 @@
Sun Nov 3 15:00:03 1991 Per Bothner (bothner at cygnus.com)
* configure.in: Fixed typo. Also, a fix for hp300bsd.
* ldlang.c (init_os): Compensate for BFD change,
where bfd_make_section now returns NULL for a duplicate
section request, instead of the old section.
Thu Oct 17 15:27:13 1991 Per Bothner (bothner at cygnus.com)
* ldver.c: Bump to version 1.91 (consistent with binutils).
Wed Oct 16 12:27:08 1991 Per Bothner (bothner at cygnus.com) Wed Oct 16 12:27:08 1991 Per Bothner (bothner at cygnus.com)
* Makefile.in, config.h, ld.h, ldemul.c, ldexp.c, ldexp.h, * Makefile.in, config.h, ld.h, ldemul.c, ldexp.c, ldexp.h,

View File

@ -97,9 +97,8 @@ if [ ! -f ${files} ] ; then
echo '***' ${srcname} does not support host ${host} echo '***' ${srcname} does not support host ${host}
exit 1 exit 1
fi fi
host_makefile_frag= host_makefile_frag=
if [ -f config/h-${my_host} ] ; then if [ -f config/mh-${my_host} ] ; then
host_makefile_frag=config/mh-${my_host} host_makefile_frag=config/mh-${my_host}
fi fi
@ -125,6 +124,7 @@ sun)
m68k) m68k)
case ${target_vendor} in case ${target_vendor} in
sony) my_target=news;; sony) my_target=news;;
hp) my_target=hp300bsd;;
*) *)
echo "Unknown m68k target vendor:" ${target_vendor} echo "Unknown m68k target vendor:" ${target_vendor}
exit 1 exit 1

View File

@ -496,7 +496,9 @@ DEFUN(init_os,(s),
(section_userdata_type *) (section_userdata_type *)
ldmalloc((bfd_size_type)(sizeof(section_userdata_type))); ldmalloc((bfd_size_type)(sizeof(section_userdata_type)));
s->bfd_section = bfd_make_section(output_bfd, s->name); s->bfd_section = bfd_get_section_by_name(output_bfd, s->name);
if (s->bfd_section == (asection *)NULL)
s->bfd_section = bfd_make_section(output_bfd, s->name);
if (s->bfd_section == (asection *)NULL) { if (s->bfd_section == (asection *)NULL) {
info("%P%F output format %s cannot represent section called %s\n", info("%P%F output format %s cannot represent section called %s\n",
output_bfd->xvec->name, output_bfd->xvec->name,
@ -698,6 +700,14 @@ DEFUN(ldlang_open_output,(statement),
case lang_output_statement_enum: case lang_output_statement_enum:
output_bfd = open_output(statement->output_statement.name); output_bfd = open_output(statement->output_statement.name);
ldemul_set_output_arch(); ldemul_set_output_arch();
if (config.magic_demand_paged && !config.relocateable_output)
output_bfd->flags |= ~D_PAGED;
else
output_bfd->flags &= ~D_PAGED;
if (config.text_read_only)
output_bfd->flags |= WP_TEXT;
else
output_bfd->flags &= ~WP_TEXT;
break; break;
case lang_target_statement_enum: case lang_target_statement_enum:
@ -2333,8 +2343,6 @@ DEFUN(lang_abs_symbol_at_beginning_of,(section, name),
CONST char *name) CONST char *name)
{ {
if (ldsym_undefined(name)) { if (ldsym_undefined(name)) {
extern bfd *output_bfd;
extern asymbol *create_symbol();
asection *s = bfd_get_section_by_name(output_bfd, section); asection *s = bfd_get_section_by_name(output_bfd, section);
asymbol *def = create_symbol(name, asymbol *def = create_symbol(name,
BSF_GLOBAL | BSF_EXPORT | BSF_GLOBAL | BSF_EXPORT |
@ -2361,8 +2369,6 @@ DEFUN(lang_abs_symbol_at_end_of,(section, name),
CONST char *name) CONST char *name)
{ {
if (ldsym_undefined(name)){ if (ldsym_undefined(name)){
extern bfd *output_bfd;
extern asymbol *create_symbol();
asection *s = bfd_get_section_by_name(output_bfd, section); asection *s = bfd_get_section_by_name(output_bfd, section);
/* Add a symbol called _end */ /* Add a symbol called _end */
asymbol *def = create_symbol(name, asymbol *def = create_symbol(name,