]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Standardise check for static PDE
authorMatthew Malcomson <matthew.malcomson@arm.com>
Fri, 5 Aug 2022 16:19:30 +0000 (17:19 +0100)
committerMatthew Malcomson <matthew.malcomson@arm.com>
Fri, 5 Aug 2022 16:50:11 +0000 (17:50 +0100)
commitaeba84b166fb5f19eba1cf6a3efbc22661bba966
tree705e028ba96c10b5554c7375b01dce91a06e8497
parente8424a874d37006e239664b6fbff3c6980e68ab7
Standardise check for static PDE

We have hit multiple problems checking for a static non-PIE binary using
incorrect conditions.  In looking into a TLS relaxation that should not
have happened we found another.  To help avoid this problem in the
future (and to make reading the code a lot easier for someone who isn't
familiar with the BFD linker flags) we now perform the check for a
static PDE with a macro called `static_pde`.

N.b. this macro can only be used after we've created any needed dynamic
sections.  That happens when loading symbols, which is very early on and
hence before any of the places we want to use this macro.  However it's
still good to note it's not always a valid check.
bfd/elfnn-aarch64.c