From 4ff738568a8db39bbdce0b660f8065740c67df18 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 24 Jul 2008 07:51:25 +0000 Subject: [PATCH] * elf.c (_bfd_elf_map_sections_to_segments): Catch off by one error assigning sections to segments. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1b5f018..da58640 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2008-07-24 Nick Clifton + + * elf.c (_bfd_elf_map_sections_to_segments): Catch off by one + error assigning sections to segments. + 2008-07-22 Nick Clifton * elf.c (_bfd_elf_map_sections_to_segments): Allow sections in diff --git a/bfd/elf.c b/bfd/elf.c index a7cc4a5..e24b04e 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -3728,7 +3728,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) else if ((BFD_ALIGN (last_hdr->lma + last_size, maxpagesize) + maxpagesize > last_hdr->lma) && (BFD_ALIGN (last_hdr->lma + last_size, maxpagesize) + maxpagesize - < hdr->lma)) + <= hdr->lma)) { /* If putting this section in this segment would force us to skip a page in the segment, then we need a new segment. */ -- 2.7.4