2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
* elf.c (_bfd_elf_new_section_hook): Don't call _bfd_elf_get_sec_type_attr on sections from input files.
This commit is contained in:
parent
d05da6a8c2
commit
a31501e943
2 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* elf.c (_bfd_elf_new_section_hook): Don't call
|
||||||
|
_bfd_elf_get_sec_type_attr on sections from input files.
|
||||||
|
|
||||||
2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
|
2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* merge.c (sec_merge_init): Call bfd_hash_table_init_n with
|
* merge.c (sec_merge_init): Call bfd_hash_table_init_n with
|
||||||
|
|
15
bfd/elf.c
15
bfd/elf.c
|
@ -2245,12 +2245,17 @@ _bfd_elf_new_section_hook (bfd *abfd, asection *sec)
|
||||||
sec->used_by_bfd = sdata;
|
sec->used_by_bfd = sdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
elf_section_type (sec) = SHT_NULL;
|
/* When we read a file, we don't need section type and flags.
|
||||||
ssect = _bfd_elf_get_sec_type_attr (abfd, sec->name);
|
They will be overridden in _bfd_elf_make_section_from_shdr
|
||||||
if (ssect != NULL)
|
anyway. */
|
||||||
|
if (abfd->direction != read_direction)
|
||||||
{
|
{
|
||||||
elf_section_type (sec) = ssect->type;
|
ssect = _bfd_elf_get_sec_type_attr (abfd, sec->name);
|
||||||
elf_section_flags (sec) = ssect->attr;
|
if (ssect != NULL)
|
||||||
|
{
|
||||||
|
elf_section_type (sec) = ssect->type;
|
||||||
|
elf_section_flags (sec) = ssect->attr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Indicate whether or not this section should use RELA relocations. */
|
/* Indicate whether or not this section should use RELA relocations. */
|
||||||
|
|
Loading…
Reference in a new issue