]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(build): discard sections also with SEPARATE_NOBITS_REGION
authorSamuel Holland <samuel@sholland.org>
Sat, 9 Apr 2022 03:22:04 +0000 (22:22 -0500)
committerSamuel Holland <samuel@sholland.org>
Thu, 11 Aug 2022 01:23:12 +0000 (20:23 -0500)
Some linker sections are discarded since 511046eaa28f ("BL31: discard
.dynsym .dynstr .hash sections to make ENABLE_PIE work"). However, that
logic was placed inside a preprocessor condition, so it only applied to
the !SEPARATE_NOBITS_REGION case. Move the /DISCARD/ block down so it
applies in all cases.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: I6604609f2321a2a9c32a25721a697c320108a974

bl31/bl31.ld.S

index 8a1573ab61c88678caa506beb21148d944ee0f30..3d3dc959b84e65d1ffc9851c3ae4e38ebde56fb4 100644 (file)
@@ -186,10 +186,10 @@ SECTIONS
     __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
 }