* 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.
This commit is contained in:
parent
cb2f3a2924
commit
e81d3500e7
@ -1,3 +1,15 @@
|
|||||||
|
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>
|
2005-08-30 Phil Edwards <phil@codesourcery.com>
|
||||||
|
|
||||||
* config.bfd (i[3-7]86-*-vxworks): Match vxworks* instead.
|
* config.bfd (i[3-7]86-*-vxworks): Match vxworks* instead.
|
||||||
|
@ -1165,6 +1165,7 @@ elf_i386_check_relocs (bfd *abfd,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
void **vpp;
|
||||||
/* Track dynamic relocs needed for local syms too.
|
/* Track dynamic relocs needed for local syms too.
|
||||||
We really need local syms available to do this
|
We really need local syms available to do this
|
||||||
easily. Oh well. */
|
easily. Oh well. */
|
||||||
@ -1175,8 +1176,8 @@ elf_i386_check_relocs (bfd *abfd,
|
|||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
head = ((struct elf_i386_dyn_relocs **)
|
vpp = &elf_section_data (s)->local_dynrel;
|
||||||
&elf_section_data (s)->local_dynrel);
|
head = (struct elf_i386_dyn_relocs **)vpp;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = *head;
|
p = *head;
|
||||||
@ -1823,8 +1824,8 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
|
|||||||
{
|
{
|
||||||
struct elf_i386_dyn_relocs *p;
|
struct elf_i386_dyn_relocs *p;
|
||||||
|
|
||||||
for (p = *((struct elf_i386_dyn_relocs **)
|
for (p = ((struct elf_i386_dyn_relocs *)
|
||||||
&elf_section_data (s)->local_dynrel);
|
elf_section_data (s)->local_dynrel);
|
||||||
p != NULL;
|
p != NULL;
|
||||||
p = p->next)
|
p = p->next)
|
||||||
{
|
{
|
||||||
|
@ -946,6 +946,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
void **vpp;
|
||||||
/* Track dynamic relocs needed for local syms too.
|
/* Track dynamic relocs needed for local syms too.
|
||||||
We really need local syms available to do this
|
We really need local syms available to do this
|
||||||
easily. Oh well. */
|
easily. Oh well. */
|
||||||
@ -956,8 +957,10 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
|
|||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
head = ((struct elf64_x86_64_dyn_relocs **)
|
/* Beware of type punned pointers vs strict aliasing
|
||||||
&elf_section_data (s)->local_dynrel);
|
rules. */
|
||||||
|
vpp = &(elf_section_data (s)->local_dynrel);
|
||||||
|
head = (struct elf64_x86_64_dyn_relocs **)vpp;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = *head;
|
p = *head;
|
||||||
@ -1586,8 +1589,8 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
|
|||||||
{
|
{
|
||||||
struct elf64_x86_64_dyn_relocs *p;
|
struct elf64_x86_64_dyn_relocs *p;
|
||||||
|
|
||||||
for (p = *((struct elf64_x86_64_dyn_relocs **)
|
for (p = (struct elf64_x86_64_dyn_relocs *)
|
||||||
&elf_section_data (s)->local_dynrel);
|
(elf_section_data (s)->local_dynrel);
|
||||||
p != NULL;
|
p != NULL;
|
||||||
p = p->next)
|
p = p->next)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user