mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
Properly warn relocation in readonly section in a shared object.
2011-06-01 H.J. Lu <hongjiu.lu@intel.com> * elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn relocation in readonly section in a shared object. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2011-06-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
|
||||||
|
relocation in readonly section in a shared object.
|
||||||
|
* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
|
||||||
|
|
||||||
2011-05-31 Nick Clifton <nickc@redhat.com>
|
2011-05-31 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* archive.c (adjust_relative_path): Fix comment to prevent it
|
* archive.c (adjust_relative_path): Fix comment to prevent it
|
||||||
|
@ -2488,13 +2488,13 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
|
|||||||
{
|
{
|
||||||
srel = elf_section_data (p->sec)->sreloc;
|
srel = elf_section_data (p->sec)->sreloc;
|
||||||
srel->size += p->count * sizeof (Elf32_External_Rel);
|
srel->size += p->count * sizeof (Elf32_External_Rel);
|
||||||
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
|
if ((p->sec->output_section->flags & SEC_READONLY) != 0
|
||||||
|
&& (info->flags & DF_TEXTREL) == 0)
|
||||||
{
|
{
|
||||||
info->flags |= DF_TEXTREL;
|
info->flags |= DF_TEXTREL;
|
||||||
if (info->warn_shared_textrel && info->shared)
|
if (info->warn_shared_textrel && info->shared)
|
||||||
info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'.\n"),
|
info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'.\n"),
|
||||||
p->sec->owner, p->sec);
|
p->sec->owner, p->sec);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2399,13 +2399,13 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
|
|||||||
{
|
{
|
||||||
srel = elf_section_data (p->sec)->sreloc;
|
srel = elf_section_data (p->sec)->sreloc;
|
||||||
srel->size += p->count * bed->s->sizeof_rela;
|
srel->size += p->count * bed->s->sizeof_rela;
|
||||||
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
|
if ((p->sec->output_section->flags & SEC_READONLY) != 0
|
||||||
|
&& (info->flags & DF_TEXTREL) == 0)
|
||||||
{
|
{
|
||||||
info->flags |= DF_TEXTREL;
|
info->flags |= DF_TEXTREL;
|
||||||
if (info->warn_shared_textrel && info->shared)
|
if (info->warn_shared_textrel && info->shared)
|
||||||
info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'.\n"),
|
info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'.\n"),
|
||||||
p->sec->owner, p->sec);
|
p->sec->owner, p->sec);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user