diff options
author | Steve Chamberlain <sac@cygnus> | 1992-06-18 16:42:46 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1992-06-18 16:42:46 +0000 |
commit | 30d1a3904f93edf8aa397958e74508db5ef584e0 (patch) | |
tree | ebfd749c6988f85891e6bef3997175784575a42b /ld/ldlang.c | |
parent | 7634ebc8048e1b6b264f52b02bc54700e1f390fa (diff) | |
download | gdb-30d1a3904f93edf8aa397958e74508db5ef584e0.zip gdb-30d1a3904f93edf8aa397958e74508db5ef584e0.tar.gz gdb-30d1a3904f93edf8aa397958e74508db5ef584e0.tar.bz2 |
* h8300hms.em, h8300hms.sc-sh: do the right thing for -r
* ldexp.c: lint
* ldlang.c(open_output): set the target arch and machine as soon
as we can. (lang_size_sections): use new macros for setting vma
* ldwrite.c: lint
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 00250a3..e1f3f2f 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -714,30 +714,37 @@ static bfd * DEFUN (open_output, (name), CONST char *CONST name) { + extern unsigned long ldfile_output_machine; + extern enum bfd_architecture ldfile_output_architecture; + extern CONST char *output_filename; bfd *output; if (output_target == (char *) NULL) - { - if (current_target != (char *) NULL) - output_target = current_target; - else - output_target = default_target; - } + { + if (current_target != (char *) NULL) + output_target = current_target; + else + output_target = default_target; + } output = bfd_openw (name, output_target); output_filename = name; if (output == (bfd *) NULL) + { + if (bfd_error == invalid_target) { - if (bfd_error == invalid_target) - { - einfo ("%P%F target %s not found\n", output_target); - } - einfo ("%P%F problem opening output file %s, %E", name); + einfo ("%P%F target %s not found\n", output_target); } + einfo ("%P%F problem opening output file %s, %E", name); + } + + /* output->flags |= D_PAGED;*/ -/* output->flags |= D_PAGED;*/ bfd_set_format (output, bfd_object); + bfd_set_arch_mach(output, + ldfile_output_architecture, + ldfile_output_machine); return output; } @@ -1446,7 +1453,7 @@ DEFUN (lang_size_sections, (s, output_section_statement, prev, fill, if (os->bfd_section == &bfd_abs_section) { /* No matter what happens, an abs section starts at zero */ - os->bfd_section->vma = 0; + bfd_set_section_vma (0, os->bfd_section, 0); } else { @@ -1481,7 +1488,7 @@ DEFUN (lang_size_sections, (s, output_section_statement, prev, fill, dot = align_power (dot, os->bfd_section->alignment_power); - os->bfd_section->vma = dot; + bfd_set_section_vma (0, os->bfd_section, dot); } |