diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2002-02-09 05:07:07 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2002-02-09 05:07:07 +0000 |
commit | 74c44237fd10b2bd25ffbb0c065492485e98f3ee (patch) | |
tree | ddef0b9ad1e8f193bfeec60a2eeed36ab864cee8 /ld | |
parent | 7e799044895a1c8775626903a011d59ae24e68ae (diff) | |
download | ppe42-binutils-74c44237fd10b2bd25ffbb0c065492485e98f3ee.tar.gz ppe42-binutils-74c44237fd10b2bd25ffbb0c065492485e98f3ee.zip |
* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
register section vma to a sane value after emitting error. Make
fatal conditions cause program exit when emitting message.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/emultempl/mmix-elfnmmo.em | 21 |
2 files changed, 19 insertions, 8 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index a6931b98c1..4362d528f8 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2002-02-09 Hans-Peter Nilsson <hp@bitrange.com> + + * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust + register section vma to a sane value after emitting error. Make + fatal conditions cause program exit when emitting message. + 2002-02-08 Ivan Guzvinec <ivang@opencores.org> * configure.tgt: Add or32-*-rtems target. diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em index c6c7691abb..3357d36e07 100644 --- a/ld/emultempl/mmix-elfnmmo.em +++ b/ld/emultempl/mmix-elfnmmo.em @@ -67,10 +67,16 @@ mmix_after_allocation () regvma = 256 * 8 - sec->_raw_size - 8; - /* If we start on a local register, we have too many global registers. */ + /* If we start on a local register, we have too many global registers. + We treat this error as nonfatal (meaning processing will continue in + search for other errors), because it's a link error in the same way + as an undefined symbol. */ if (regvma < 32 * 8) - einfo ("%X%P: Too many global registers: %u, max 223\n", - (unsigned) sec->_raw_size / 8); + { + einfo ("%X%P: Too many global registers: %u, max 223\n", + (unsigned) sec->_raw_size / 8); + regvma = 32 * 8; + } /* Set vma to correspond to first such register number * 8. */ bfd_set_section_vma (output_bfd, sec, (bfd_vma) regvma); @@ -80,9 +86,9 @@ mmix_after_allocation () if (sec->_cooked_size == 0 && ! bfd_set_section_size (output_bfd, sec, sec->_raw_size)) { - einfo ("%X%P: Can't set section %s size to %u\n", + /* This is a fatal error; make the einfo call not return. */ + einfo ("%F%P: Can't set section %s size to %u\n", MMIX_REG_CONTENTS_SECTION_NAME, (unsigned) sec->_raw_size); - return; } /* Simplify symbol output for the register section (without contents; @@ -94,9 +100,8 @@ mmix_after_allocation () if (!_bfd_mmix_finalize_linker_allocated_gregs (output_bfd, &link_info)) { - einfo ("%X%P: Can't finalize linker-allocated global registers\n"); - /* In case stuff is added after this conditional. */ - return; + /* This is a fatal error; make einfo call not return. */ + einfo ("%F%P: Can't finalize linker-allocated global registers\n"); } } EOF |