forked from Imagelibrary/binutils-gdb
bfd/
* elf.c (assign_file_positions_for_load_sections): Use p_memsz rather than p_filesz to calculate the LMA of the end of a segment. ld/testsuite/ * ld-elf/multibss1.d, ld-elf/multibss1.s: New test.
This commit is contained in:
@@ -4520,7 +4520,7 @@ assign_file_positions_for_load_sections (bfd *abfd,
|
||||
if (p->p_type == PT_LOAD
|
||||
|| p->p_type == PT_TLS)
|
||||
{
|
||||
bfd_signed_vma adjust = sec->lma - (p->p_paddr + p->p_filesz);
|
||||
bfd_signed_vma adjust = sec->lma - (p->p_paddr + p->p_memsz);
|
||||
|
||||
if ((flags & SEC_LOAD) != 0
|
||||
|| ((flags & SEC_ALLOC) != 0
|
||||
|
||||
Reference in New Issue
Block a user