mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 16:05:56 +08:00
* elfcode.h (map_program_segments): Check DYNAMIC as well as EXEC_P.
(assign_file_positions_except_relocs): Likewise.
This commit is contained in:
@ -1745,7 +1745,7 @@ map_program_segments (abfd, off, first, phdr_size)
|
|||||||
unsigned int last_type;
|
unsigned int last_type;
|
||||||
Elf_Internal_Ehdr *i_ehdrp;
|
Elf_Internal_Ehdr *i_ehdrp;
|
||||||
|
|
||||||
BFD_ASSERT ((abfd->flags & EXEC_P) != 0);
|
BFD_ASSERT ((abfd->flags & (EXEC_P | DYNAMIC)) != 0);
|
||||||
BFD_ASSERT (phdr_size / sizeof (Elf_Internal_Phdr)
|
BFD_ASSERT (phdr_size / sizeof (Elf_Internal_Phdr)
|
||||||
<= sizeof phdrs / sizeof (phdrs[0]));
|
<= sizeof phdrs / sizeof (phdrs[0]));
|
||||||
|
|
||||||
@ -1976,7 +1976,7 @@ assign_file_positions_except_relocs (abfd, dosyms)
|
|||||||
/* Start after the ELF header. */
|
/* Start after the ELF header. */
|
||||||
off = i_ehdrp->e_ehsize;
|
off = i_ehdrp->e_ehsize;
|
||||||
|
|
||||||
if ((abfd->flags & EXEC_P) == 0)
|
if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
|
||||||
{
|
{
|
||||||
Elf_Internal_Shdr **hdrpp;
|
Elf_Internal_Shdr **hdrpp;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
Reference in New Issue
Block a user