diff options
author | Nick Clifton <nickc@redhat.com> | 2004-09-06 17:24:32 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-09-06 17:24:32 +0000 |
commit | 9a0789ec7d034bb1035cf559381c624f8a50734e (patch) | |
tree | 9dbcbf5d50a207257dffcab8116a591d62c8f183 /bfd/elflink.c | |
parent | 7b53ace3e99c019e1372b4fcf8c152902c9c85e6 (diff) | |
download | gdb-9a0789ec7d034bb1035cf559381c624f8a50734e.zip gdb-9a0789ec7d034bb1035cf559381c624f8a50734e.tar.gz gdb-9a0789ec7d034bb1035cf559381c624f8a50734e.tar.bz2 |
(elf_link_add_object_symbols): Set the error code to bfd_error_wrong_format when
the input format does not match the output format.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 6ccc08c..e82a8e3 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2940,7 +2940,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) || !is_elf_hash_table (hash_table) || hash_table->root.creator != abfd->xvec) { - bfd_set_error (bfd_error_invalid_operation); + if (info->relocatable) + bfd_set_error (bfd_error_invalid_operation); + else + bfd_set_error (bfd_error_wrong_format); goto error_return; } } |