mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
* elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
DT_TEXTREL entry because of .rel.plt. From Martin Pirker <pirker@eiunix.tuwien.ac.at>.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
|
||||||
|
DT_TEXTREL entry because of .rel.plt. From Martin Pirker
|
||||||
|
<pirker@eiunix.tuwien.ac.at>.
|
||||||
|
|
||||||
Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||||
|
|
||||||
* section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
|
* section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
|
||||||
|
@ -363,10 +363,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
|
|||||||
size = symtab_hdr->sh_info * sizeof (bfd_vma);
|
size = symtab_hdr->sh_info * sizeof (bfd_vma);
|
||||||
local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
|
local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
|
||||||
if (local_got_offsets == NULL)
|
if (local_got_offsets == NULL)
|
||||||
{
|
return false;
|
||||||
bfd_set_error (bfd_error_no_memory);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
elf_local_got_offsets (abfd) = local_got_offsets;
|
elf_local_got_offsets (abfd) = local_got_offsets;
|
||||||
for (i = 0; i < symtab_hdr->sh_info; i++)
|
for (i = 0; i < symtab_hdr->sh_info; i++)
|
||||||
local_got_offsets[i] = (bfd_vma) -1;
|
local_got_offsets[i] = (bfd_vma) -1;
|
||||||
@ -725,14 +722,19 @@ elf_i386_size_dynamic_sections (output_bfd, info)
|
|||||||
/* Remember whether there are any reloc sections other
|
/* Remember whether there are any reloc sections other
|
||||||
than .rel.plt. */
|
than .rel.plt. */
|
||||||
if (strcmp (name, ".rel.plt") != 0)
|
if (strcmp (name, ".rel.plt") != 0)
|
||||||
relocs = true;
|
{
|
||||||
|
relocs = true;
|
||||||
|
|
||||||
/* If this relocation section applies to a read only
|
/* If this relocation section applies to a read only
|
||||||
section, then we probably need a DT_TEXTREL entry. */
|
section, then we probably need a DT_TEXTREL
|
||||||
target = bfd_get_section_by_name (output_bfd, name + 4);
|
entry. The entries in the .rel.plt section
|
||||||
if (target != NULL
|
really apply to the .got section, which we
|
||||||
&& (target->flags & SEC_READONLY) != 0)
|
created ourselves and so know is not readonly. */
|
||||||
reltext = true;
|
target = bfd_get_section_by_name (output_bfd, name + 4);
|
||||||
|
if (target != NULL
|
||||||
|
&& (target->flags & SEC_READONLY) != 0)
|
||||||
|
reltext = true;
|
||||||
|
}
|
||||||
|
|
||||||
/* We use the reloc_count field as a counter if we need
|
/* We use the reloc_count field as a counter if we need
|
||||||
to copy relocs into the output file. */
|
to copy relocs into the output file. */
|
||||||
@ -762,10 +764,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
|
|||||||
/* Allocate memory for the section contents. */
|
/* Allocate memory for the section contents. */
|
||||||
s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
|
s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
|
||||||
if (s->contents == NULL && s->_raw_size != 0)
|
if (s->contents == NULL && s->_raw_size != 0)
|
||||||
{
|
return false;
|
||||||
bfd_set_error (bfd_error_no_memory);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elf_hash_table (info)->dynamic_sections_created)
|
if (elf_hash_table (info)->dynamic_sections_created)
|
||||||
|
Reference in New Issue
Block a user