summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/head.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-17 13:45:21 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-30 18:45:34 +0200
commit1031a7e674d1de481d641c3723d5f53b776f621f (patch)
treef3b8a43b577bc7faed23d04221ef1e52403936e7 /arch/arm/kernel/head.S
parentARM: kernel: allocate PLT entries only for external symbols (diff)
downloadlinux-1031a7e674d1de481d641c3723d5f53b776f621f.tar.xz
linux-1031a7e674d1de481d641c3723d5f53b776f621f.zip
ARM: kernel: sort relocation sections before allocating PLTs
The PLT allocation routines try to establish an upper bound on the number of PLT entries that will be required at relocation time, and optimize this by disregarding duplicates (i.e., PLT entries that will end up pointing to the same function). This is currently a O(n^2) algorithm, but we can greatly simplify this by - sorting the relocation section so that relocations that can use the same PLT entry will be listed adjacently, - disregard jump/call relocations with addends; these are highly unusual, for relocations against SHN_UNDEF symbols, and so we can simply allocate a PLT entry for each one we encounter, without trying to optimize away duplicates. Tested-by: Jongsung Kim <neidhard.kim@lge.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'arch/arm/kernel/head.S')
0 files changed, 0 insertions, 0 deletions