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 | |
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
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/h8300hms.em | 4 | ||||
-rwxr-xr-x | ld/h8300hms.sc-sh | 8 | ||||
-rw-r--r-- | ld/ldlang.c | 35 |
4 files changed, 35 insertions, 20 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index cd923e5..6ad0c50 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +Thu Jun 18 09:38:56 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * 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 + Mon Jun 15 08:47:43 1992 Michael Tiemann (tiemann@rtl.cygnus.com) * configure.in (my_target): Accept m680?0 for wrs as vxworks68. diff --git a/ld/h8300hms.em b/ld/h8300hms.em index c14467b..2402dc9 100644 --- a/ld/h8300hms.em +++ b/ld/h8300hms.em @@ -53,10 +53,10 @@ static char *h8300hms_script = #include "h8300hms.x" ; static char *h8300hms_script_option_Ur = -#include "h8300hms.xu" +#include "h8300hms.x" ; static char *h8300hms_script_option_r = -#include "h8300hms.xr" +#include "h8300hms.x" ; static char *h8300hms_get_script() diff --git a/ld/h8300hms.sc-sh b/ld/h8300hms.sc-sh index 6eab5c2..ca19afb 100755 --- a/ld/h8300hms.sc-sh +++ b/ld/h8300hms.sc-sh @@ -16,23 +16,23 @@ SECTIONS { *(.text) *(.strings) - ${RELOCATING+_etext = .;} + _etext = .; } ${RELOCATING+ > ram} .data : { *(.data) - ${RELOCATING+_edata = .;} + _edata = .; } ${RELOCATING+ > ram} .bss : { - ${RELOCATING+ _bss_start = .;} + ${RELOCATING+ _bss_start = .}; *(.bss) *(COMMON) ${RELOCATING+ _end = .}; } ${RELOCATING+ >ram} .stack : { - ${RELOCATING+_stack = .;} + _stack = .; *(.stack) } ${RELOCATING+ > topram} } 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); } |