diff options
author | Alan Modra <amodra@bigpond.net.au> | 2001-11-13 03:52:25 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2001-11-13 03:52:25 +0000 |
commit | da4aea843e5bab2fc29149b64256dbd166de6cc9 (patch) | |
tree | 43f6161ccf24f4586a121c74f963dbeeee81ef18 /bfd/section.c | |
parent | 1a5c6adfdd5a56cbc5906dc6ea2af2c250321fdf (diff) | |
download | binutils-redhat-da4aea843e5bab2fc29149b64256dbd166de6cc9.tar.gz |
* section.c (bfd_make_section_anyway): Don't increment section_id
and the BFD's section_count if adding the section failed.
* vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
change.
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 53491f1355..0d95f11783 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; } |