I could only find one "common" case that happened, which is calling a
function without specifying -fpic. So I broke that one out, patch
below. I'm open to suggestions on the wording of these messages, but
let's improve on "dangerous error".
Index: elf-m10300.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-m10300.c,v
retrieving revision 1.77
diff -p -U3 -r1.77 elf-m10300.c
--- elf-m10300.c 17 Oct 2006 13:41:46 -0000 1.77
+++ elf-m10300.c 26 Jan 2007 02:18:38 -0000
@@ -1499,7 +1499,10 @@ mn10300_elf_relocate_section (output_bfd
goto common_error;
case bfd_reloc_dangerous:
- msg = _("internal error: dangerous error");
+ if (r_type == R_MN10300_PCREL32)
+ msg = _("error: inappropriate relocation type for shared library
(did you forget -fpic?)");
+ else
+ msg = _("internal error: dangerous relocation type used in
shared library");