aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2019-01-12 00:35:20 -0800
committerH. Peter Anvin <hpa@zytor.com>2019-01-12 00:35:20 -0800
commit69fa3c2e8e09c1cda8334bec1a7d022cdf877383 (patch)
treedcb3859c85fbefc159028249a55db413d36380b1 /test
parent52266ad42490f48b91a70efb5c2f93ea281eeb60 (diff)
downloadnasm-69fa3c2e8e09c1cda8334bec1a7d022cdf877383.tar.gz
nasm-69fa3c2e8e09c1cda8334bec1a7d022cdf877383.tar.xz
nasm-69fa3c2e8e09c1cda8334bec1a7d022cdf877383.zip
outelf: hash sections for performance
Use a hash table to look up sections by name, and an RAA to look up sections by index; thus remove O(n) searches. This becomes important since ELF uses sections for dead code elimination. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'test')
-rw-r--r--test/manysecs.asm6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/manysecs.asm b/test/manysecs.asm
new file mode 100644
index 00000000..c65c6091
--- /dev/null
+++ b/test/manysecs.asm
@@ -0,0 +1,6 @@
+%assign n 0
+%rep 10000
+ section .text %+ n progbits exec
+ nop
+%assign n n+1
+%endrep