address operator, as that breaks GCC's strict aliasing rules.
(elf_i386_size_dynamic_sections): Avoid the need for type
punning.
* elf64-x86-64.c (elf_x86_64_check_relocs): Don't cast a unary
& address operator, as that breaks GCC's strict aliasing
rules.
(elf_x86_64_size_dynamic_sections): Avoid the need for type
punning.
+2005-08-31 DJ Delorie <dj@redhat.com>
+
+ * elf32-i386.c (elf_i386_check_relocs): Don't cast a unary &
+ address operator, as that breaks GCC's strict aliasing rules.
+ (elf_i386_size_dynamic_sections): Avoid the need for type
+ punning.
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Don't cast a unary
+ & address operator, as that breaks GCC's strict aliasing
+ rules.
+ (elf_x86_64_size_dynamic_sections): Avoid the need for type
+ punning.
+
2005-08-30 Phil Edwards <phil@codesourcery.com>
* config.bfd (i[3-7]86-*-vxworks): Match vxworks* instead.
}
else
{
+ void **vpp;
/* Track dynamic relocs needed for local syms too.
We really need local syms available to do this
easily. Oh well. */
if (s == NULL)
return FALSE;
- head = ((struct elf_i386_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ vpp = &elf_section_data (s)->local_dynrel;
+ head = (struct elf_i386_dyn_relocs **)vpp;
}
p = *head;
{
struct elf_i386_dyn_relocs *p;
- for (p = *((struct elf_i386_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ for (p = ((struct elf_i386_dyn_relocs *)
+ elf_section_data (s)->local_dynrel);
p != NULL;
p = p->next)
{
}
else
{
+ void **vpp;
/* Track dynamic relocs needed for local syms too.
We really need local syms available to do this
easily. Oh well. */
if (s == NULL)
return FALSE;
- head = ((struct elf64_x86_64_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ /* Beware of type punned pointers vs strict aliasing
+ rules. */
+ vpp = &(elf_section_data (s)->local_dynrel);
+ head = (struct elf64_x86_64_dyn_relocs **)vpp;
}
p = *head;
{
struct elf64_x86_64_dyn_relocs *p;
- for (p = *((struct elf64_x86_64_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ for (p = (struct elf64_x86_64_dyn_relocs *)
+ (elf_section_data (s)->local_dynrel);
p != NULL;
p = p->next)
{