summary refs log tree commit diff
path: root/parse.c
diff options
context:
space:
mode:
authorRoberto E. Vargas Caballero <roberto.vargas@midokura.com>2022-06-29 18:01:59 +0200
committerQuentin Carbonneaux <quentin@c9x.me>2022-07-01 13:20:45 +0200
commitc8cd2824eae0137505fe46530c3a8e9788ab9a63 (patch)
tree6370028268c4382174a51412eb7213b402f1486d /parse.c
parentd9935ac14a6d74399cd18449d8e0aa8c7b374a41 (diff)
downloadroux-c8cd2824eae0137505fe46530c3a8e9788ab9a63.tar.gz
Reject multiple section definition for a symbol
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index f681c40..1912c8b 100644
--- a/parse.c
+++ b/parse.c
@@ -1071,6 +1071,8 @@ parselnk(Lnk *lnk)
 			lnk->export = 1;
 			break;
 		case Tsection:
+			if (lnk->sec)
+				err("only one section allowed");
 			if (next() != Tstr)
 				err("section \"name\" expected");
 			lnk->sec = tokval.str;