diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-01-05 14:25:26 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-01-05 14:25:26 +0000 |
commit | cc322803a5a55e75c91b5ad1fd210b79c4a49959 (patch) | |
tree | df20d5fb7e8d88bd1e62fcc2cd55a98972d7517f /ld/plugin.c | |
parent | 2e0ddd9263ea0f772c6563f0e080b001ae6ca475 (diff) | |
download | ppe42-binutils-cc322803a5a55e75c91b5ad1fd210b79c4a49959.tar.gz ppe42-binutils-cc322803a5a55e75c91b5ad1fd210b79c4a49959.zip |
Check if a bfd is NULL before accessing its flags field.
2011-01-05 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12364
* plugin.c (get_symbols): Check if owner_sec->owner is NULL
before accessing its flags field.
Diffstat (limited to 'ld/plugin.c')
-rw-r--r-- | ld/plugin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/plugin.c b/ld/plugin.c index e4943c2bdd..10314a4d48 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -511,7 +511,8 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms) : LDPR_PREVAILING_DEF); else if (is_ir_dummy_bfd (owner_sec->owner)) syms[n].resolution = LDPR_RESOLVED_IR; - else if (owner_sec->owner->flags & DYNAMIC) + else if (owner_sec->owner != NULL + && (owner_sec->owner->flags & DYNAMIC) != 0) syms[n].resolution = LDPR_RESOLVED_DYN; else syms[n].resolution = LDPR_RESOLVED_EXEC; |