]> git.baikalelectronics.ru Git - arm-tf.git/commit
fix(build): disable default PIE when linking
authorSamuel Holland <samuel@sholland.org>
Sat, 9 Apr 2022 02:56:02 +0000 (21:56 -0500)
committerSamuel Holland <samuel@sholland.org>
Thu, 11 Aug 2022 01:23:12 +0000 (20:23 -0500)
commit7b5924184566bcdcc01966905ffdcabcd6ea4b32
tree280330c1de7091fe4a1fb62ca1a35684f8fa58dd
parentf924258da7f016f685e72a71b72109de53c52541
fix(build): disable default PIE when linking

Commit f7ec31db2d ("Disable PIE compilation option") allowed building a
non-relocatable firmware with a default-PIE toolchain by disabling PIE
at compilation time. This prevents the compiler from generating
relocations against a GOT.

However, when a default-PIE GCC is used as the linker, the final binary
will still be a PIE, containing an (unused) GOT and dynamic symbol
table. These structures do not affect execution, but they waste space in
the firmware binary. Disable PIE at link time to recover this space.

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