This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/binutils-2_25-branch] Set bfd_error in _bfd_elf_adjust_dynamic_copy
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 11 Feb 2015 12:49:04 -0000
- Subject: [binutils-gdb/binutils-2_25-branch] Set bfd_error in _bfd_elf_adjust_dynamic_copy
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bfd74fb20fc4cade1c36f6c40888b22cac75fa76
commit bfd74fb20fc4cade1c36f6c40888b22cac75fa76
Author: Alan Modra <amodra@gmail.com>
Date: Fri Dec 12 23:39:14 2014 +1030
Set bfd_error in _bfd_elf_adjust_dynamic_copy
PR 15228
* elflink.c (_bfd_elf_adjust_dynamic_copy): Call bfd_set_error.
Diff:
---
bfd/ChangeLog | 4 ++++
bfd/elflink.c | 1 +
2 files changed, 5 insertions(+)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index da7b116..701907c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -3,6 +3,10 @@
Apply from master.
2014-12-12 Alan Modra <amodra@gmail.com>
PR 15228
+ * elflink.c (_bfd_elf_adjust_dynamic_copy): Call bfd_set_error.
+
+ 2014-12-12 Alan Modra <amodra@gmail.com>
+ PR 15228
* elflink.c (_bfd_elf_adjust_dynamic_copy): Add "info" param.
Error on copy relocs against protected symbols.
(elf_merge_st_other): Set h->protected_def.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 5bd7136..6e638dd 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -2684,6 +2684,7 @@ _bfd_elf_adjust_dynamic_copy (struct bfd_link_info *info,
info->callbacks->einfo
(_("%P: copy reloc against protected `%T' is invalid\n"),
h->root.root.string);
+ bfd_set_error (bfd_error_bad_value);
return FALSE;
}