From 82d6e6c91c411308609492fc332c9d17afbd5345 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 23 May 2004 18:08:16 +0000 Subject: [PATCH] Adding a note section, can result in adding two elf segments. Account for that. --- gnu/dist/binutils/bfd/elf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/dist/binutils/bfd/elf.c b/gnu/dist/binutils/bfd/elf.c index 523dfc097980..7989731a550d 100644 --- a/gnu/dist/binutils/bfd/elf.c +++ b/gnu/dist/binutils/bfd/elf.c @@ -4105,7 +4105,11 @@ get_program_header_size (abfd) && strncmp (s->name, ".note", 5) == 0) { /* We need a PT_NOTE segment. */ - ++segs; + /* + * XXX: we allocate 2 here, because we can get 2 elf_segment_map's + * from it. + */ + segs += 2; } }