This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
#include "sysdep.h"
#include "bfd.h"
{
reloc_howto_type *howto;
- if (rel->r_type > sizeof (howto_table) / sizeof (howto_table[0]))
+ if (rel->r_type >= sizeof (howto_table) / sizeof (howto_table[0]))
{
bfd_set_error (bfd_error_bad_value);
return NULL;
*addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
}
- if (rel->r_type == R_SECREL32)
+ BFD_ASSERT (sym != NULL);
+ if (rel->r_type == R_SECREL32 && sym != NULL)
{
bfd_vma osect_vma;