Plugin related segfault
Alan Modra
amodra@gmail.com
Thu Nov 4 12:44:00 GMT 2010
More information about the Binutils mailing list
Thu Nov 4 12:44:00 GMT 2010
- Previous message (by thread): [MIPS] ELF e_flags match failure
- Next message (by thread): Plugin related segfault
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Fixes a segfault when plugin_multiple_definition calls is_ir_dummy_bfd
with a NULL abfd. Symbols can be defined in the absolute section,
which has a NULL owner.
* plugin.c (is_ir_dummy_bfd): Don't segfault on NULL abfd.
Index: ld/plugin.c
===================================================================
RCS file: /cvs/src/src/ld/plugin.c,v
retrieving revision 1.5
diff -u -p -r1.5 plugin.c
--- ld/plugin.c 25 Oct 2010 06:22:50 -0000 1.5
+++ ld/plugin.c 4 Nov 2010 12:37:23 -0000
@@ -245,7 +245,11 @@ plugin_get_ir_dummy_bfd (const char *nam
bfd_boolean
is_ir_dummy_bfd (const bfd *abfd)
{
- size_t namlen = strlen (abfd->filename);
+ size_t namlen;
+
+ if (abfd == NULL)
+ return FALSE;
+ namlen = strlen (abfd->filename);
if (namlen < IRONLY_SUFFIX_LEN)
return FALSE;
return !strcmp (abfd->filename + namlen - IRONLY_SUFFIX_LEN, IRONLY_SUFFIX);
--
Alan Modra
Australia Development Lab, IBM
- Previous message (by thread): [MIPS] ELF e_flags match failure
- Next message (by thread): Plugin related segfault
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list