From: Vladimir Serbinenko Date: Mon, 14 Aug 2017 12:10:48 +0000 (+0200) Subject: genmoddep: Check that no modules provide the same symbol. X-Git-Url: https://iam.tj/gitweb/gitweb.cgi?p=grub.git;a=commitdiff_plain;h=3732816bc08ef605ed3b6c016ff0ed562829f243 genmoddep: Check that no modules provide the same symbol. The semantics of 2 modules providing the same symbol are undefined. So ensure that it doesn't happen. --- diff --git a/grub-core/genmoddep.awk b/grub-core/genmoddep.awk index bd98d84cd..8976beb91 100644 --- a/grub-core/genmoddep.awk +++ b/grub-core/genmoddep.awk @@ -18,6 +18,10 @@ BEGIN { { if ($1 == "defined") { + if ($3 in symtab) { + printf "%s in %s is duplicated in %s\n", $3, $2, symtab[$3] >"/dev/stderr"; + error++; + } symtab[$3] = $2; modtab[$2] = "" modtab[$2] } else if ($1 == "undefined") {