Merge "fix(build): discard sections also with SEPARATE_NOBITS_REGION" into integration
diff --git a/bl31/bl31.ld.S b/bl31/bl31.ld.S
index 8a1573a..3d3dc95 100644
--- a/bl31/bl31.ld.S
+++ b/bl31/bl31.ld.S
@@ -186,10 +186,10 @@
     __RW_END__ = .;
     __BL31_END__ = .;
 
+    ASSERT(. <= BL31_LIMIT, "BL31 image has exceeded its limit.")
+#endif
+
     /DISCARD/ : {
         *(.dynsym .dynstr .hash .gnu.hash)
     }
-
-    ASSERT(. <= BL31_LIMIT, "BL31 image has exceeded its limit.")
-#endif
 }