diff options
Diffstat (limited to 'bfd/section.c')
-rw-r--r-- | bfd/section.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/bfd/section.c b/bfd/section.c index fc6b765..834a9ab 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -821,13 +821,13 @@ _bfd_generic_new_section_hook (bfd *abfd, asection *newsect) return TRUE; } +static unsigned int section_id = 0x10; /* id 0 to 3 used by STD_SECTION. */ + /* Initializes a new section. NEWSECT->NAME is already set. */ static asection * bfd_section_init (bfd *abfd, asection *newsect) { - static unsigned int section_id = 0x10; /* id 0 to 3 used by STD_SECTION. */ - newsect->id = section_id; newsect->index = abfd->section_count; newsect->owner = abfd; @@ -1275,6 +1275,23 @@ bfd_make_section (bfd *abfd, const char *name) /* FUNCTION + bfd_get_next_section_id + +SYNOPSIS + int bfd_get_next_section_id (void); + +DESCRIPTION + Returns the id that the next section created will have. +*/ + +int +bfd_get_next_section_id (void) +{ + return section_id; +} + +/* +FUNCTION bfd_set_section_flags SYNOPSIS |