[all-commits] [llvm/llvm-project] 818b50: [ELF] Simplify the condition adding .got header
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Apr 30 17:20:04 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 818b508953c7684a6c104b89c6f6ce84e961d82e
https://github.com/llvm/llvm-project/commit/818b508953c7684a6c104b89c6f6ce84e961d82e
Author: Fangrui Song <i at maskray.me>
Date: 2021-04-30 (Fri, 30 Apr 2021)
Changed paths:
M lld/ELF/SyntheticSections.cpp
M lld/test/ELF/ppc32-tls-gd.s
M lld/test/ELF/ppc32-tls-ie.s
M lld/test/ELF/ppc32-tls-ld.s
M lld/test/ELF/riscv-tls-gd.s
M lld/test/ELF/riscv-tls-ie.s
Log Message:
-----------
[ELF] Simplify the condition adding .got header
Adopt my suggestion in https://reviews.llvm.org/D91426#2653926 ,
generalizing the ppc64 specific code.
GNU ld and glibc ld.so has a contract about the first few entries of .got .
There are somewhat complex conditions when the header is needed. This patch
switches to a simpler approach: add a header unconditionally if
_GLOBAL_OFFSET_TABLE_ is used or the number of entries is more than just the
header.
More information about the All-commits
mailing list