Reject multiple section definition for a symbol
This commit is contained in:
parent
d9935ac14a
commit
c8cd2824ea
1 changed files with 2 additions and 0 deletions
2
parse.c
2
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue