fix(build): discard sections also with SEPARATE_NOBITS_REGION

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 <>
Change-Id: I6604609f2321a2a9c32a25721a697c320108a974
1 file changed