aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2007-05-10 14:46:48 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2007-05-10 14:46:48 +0000
commit8c252fd9c3e28b18ce8982d1c798ea569969a0a4 (patch)
treee549bbcaa17f83434d39c40c346aacfb305d34a7 /bfd/elf.c
parent1430be3e9032ac32e916de1a7e1dd360ac2ecb0a (diff)
downloadgdb-8c252fd9c3e28b18ce8982d1c798ea569969a0a4.zip
gdb-8c252fd9c3e28b18ce8982d1c798ea569969a0a4.tar.gz
gdb-8c252fd9c3e28b18ce8982d1c798ea569969a0a4.tar.bz2
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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index ec0c1b3..6e1ab96 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -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