diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-04-22 22:32:17 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-04-22 22:32:17 +0400 |
commit | bb196d4fd31f147c177e5ed28b9ad82718248daa (patch) | |
tree | 2923d4be792f1b2a228f42e55abda0e3c2a9692e | |
parent | 4c45e83aacbda260ef582ec584649589eb7b62f5 (diff) | |
download | nasm-bb196d4fd31f147c177e5ed28b9ad82718248daa.tar.gz nasm-bb196d4fd31f147c177e5ed28b9ad82718248daa.tar.bz2 nasm-bb196d4fd31f147c177e5ed28b9ad82718248daa.zip |
outbin: Drop current_section variable
There is no need for it anymore.
Reported-by: "H. Peter Anvin" <hpa@linux.intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r-- | output/outbin.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/output/outbin.c b/output/outbin.c index 2492c09..dca7721 100644 --- a/output/outbin.c +++ b/output/outbin.c @@ -152,7 +152,6 @@ static struct Reloc { struct Section *target; } *relocs, **reloctail; -static int32_t current_section; static uint64_t origin; static int origin_defined; @@ -1242,8 +1241,7 @@ static int32_t bin_secname(char *name, int pass, int *bits) *bits = 16; sec = find_section_by_name(".text"); sec->flags |= TYPE_DEFINED | TYPE_PROGBITS; - current_section = sec->vstart_index; - return current_section; + return sec->vstart_index; } /* Attempt to find the requested section. If it does not @@ -1276,9 +1274,7 @@ static int32_t bin_secname(char *name, int pass, int *bits) sec->flags |= TYPE_DEFINED | TYPE_PROGBITS; #endif - /* Set the current section and return. */ - current_section = sec->vstart_index; - return current_section; + return sec->vstart_index; } static int bin_directive(enum directives directive, char *args, int pass) @@ -1444,7 +1440,7 @@ static void binfmt_init(void) last_section->labels = NULL; last_section->labels_end = &(last_section->labels); last_section->start_index = seg_alloc(); - last_section->vstart_index = current_section = seg_alloc(); + last_section->vstart_index = seg_alloc(); } /* Generate binary file output */ |