diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2002-02-15 06:50:19 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2002-02-15 06:50:19 +0000 |
commit | 83c2d653c3cfa3943fac9c354fda4a91f41113f6 (patch) | |
tree | c6a327e4d94d9cdc52e199198d1fe5bc38af0992 /ld | |
parent | 49fda6c8d0f4fb2c94863786bb8712b90abab0ca (diff) | |
download | binutils-83c2d653c3cfa3943fac9c354fda4a91f41113f6.zip binutils-83c2d653c3cfa3943fac9c354fda4a91f41113f6.tar.gz binutils-83c2d653c3cfa3943fac9c354fda4a91f41113f6.tar.bz2 |
* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
for presence of .MMIX.reg_contents.linker_allocated before early
exit.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 4 | ||||
-rw-r--r-- | ld/emultempl/mmix-elfnmmo.em | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 388ed75..e1c0df3 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,9 @@ 2002-02-15 Hans-Peter Nilsson <hp@bitrange.com> + * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check + for presence of .MMIX.reg_contents.linker_allocated before early + exit. + * NEWS: Mention support for MMIX. 2002-02-15 Alan Modra <amodra@bigpond.net.au> diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em index 3357d36..44223a8 100644 --- a/ld/emultempl/mmix-elfnmmo.em +++ b/ld/emultempl/mmix-elfnmmo.em @@ -61,7 +61,20 @@ mmix_after_allocation () = bfd_get_section_by_name (output_bfd, MMIX_REG_CONTENTS_SECTION_NAME); bfd_signed_vma regvma; - /* If there's no register section, we don't need to do anything. */ + /* If there's no register section, we don't need to do anything. On the + other hand, if a non-standard linker-script without a mapping from + MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME is present, as in the ld + test "NOCROSSREFS 2", that section (1) will be orphaned; not inserted + in MMIX_REG_CONTENTS_SECTION_NAME and (2) we will not do the + necessary preparations for those relocations that caused it to be + created. We'll SEGV from the latter error. The former error in + separation will result in a non-working binary, but that's expected + when you play tricks with linker scripts. The "NOCROSSREFS 2" test + does not run the output so it does not matter there. */ + if (sec == NULL) + sec + = bfd_get_section_by_name (output_bfd, + MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME); if (sec == NULL) return; |