diff options
Diffstat (limited to 'bfd/section.c')
-rw-r--r-- | bfd/section.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/section.c b/bfd/section.c index 53491f13551..0d95f117834 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -796,8 +796,8 @@ bfd_make_section_anyway (abfd, name) return NULL; newsect->name = name; - newsect->id = section_id++; - newsect->index = abfd->section_count++; + newsect->id = section_id; + newsect->index = abfd->section_count; newsect->flags = SEC_NO_FLAGS; newsect->userdata = NULL; @@ -831,6 +831,8 @@ bfd_make_section_anyway (abfd, name) return NULL; } + section_id++; + abfd->section_count++; *prev = newsect; return newsect; } |