mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
* elf.c (assign_file_positions_for_segments): Don't increment file
offset for a segment which contains no loadable sections.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* elf.c (assign_file_positions_for_segments): Don't increment file
|
||||||
|
offset for a segment which contains no loadable sections.
|
||||||
|
|
||||||
Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||||
|
|
||||||
* reloc.c: Add new PowerPC relocations.
|
* reloc.c: Add new PowerPC relocations.
|
||||||
|
@ -1911,7 +1911,9 @@ assign_file_positions_for_segments (abfd)
|
|||||||
else
|
else
|
||||||
p->p_flags = 0;
|
p->p_flags = 0;
|
||||||
|
|
||||||
if (p->p_type == PT_LOAD && m->count > 0)
|
if (p->p_type == PT_LOAD
|
||||||
|
&& m->count > 0
|
||||||
|
&& (m->sections[0]->flags & SEC_LOAD) != 0)
|
||||||
off += (m->sections[0]->vma - off) % bed->maxpagesize;
|
off += (m->sections[0]->vma - off) % bed->maxpagesize;
|
||||||
|
|
||||||
if (m->count == 0)
|
if (m->count == 0)
|
||||||
@ -2019,6 +2021,8 @@ assign_file_positions_for_segments (abfd)
|
|||||||
|
|
||||||
/* The section VMA must equal the file position modulo
|
/* The section VMA must equal the file position modulo
|
||||||
the page size. */
|
the page size. */
|
||||||
|
if ((flags & SEC_LOAD) != 0)
|
||||||
|
{
|
||||||
adjust = (sec->vma - off) % bed->maxpagesize;
|
adjust = (sec->vma - off) % bed->maxpagesize;
|
||||||
if (adjust != 0)
|
if (adjust != 0)
|
||||||
{
|
{
|
||||||
@ -2029,6 +2033,7 @@ assign_file_positions_for_segments (abfd)
|
|||||||
p->p_filesz += adjust;
|
p->p_filesz += adjust;
|
||||||
off += adjust;
|
off += adjust;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sec->filepos = off;
|
sec->filepos = off;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user