[AsmPrinter] __patchable_function_entries: Set SHF_LINK_ORDER for binutils 2.36 and...
authorFangrui Song <i@maskray.me>
Sat, 6 Feb 2021 03:53:06 +0000 (19:53 -0800)
committerFangrui Song <i@maskray.me>
Sat, 6 Feb 2021 03:53:06 +0000 (19:53 -0800)
commit853a2649160c1c80b9bbd38a20b53ca8fab704e8
tree9f96830aa954be63b21479c2cb4d6ead668b7f18
parent801d9cc7b94947836ed59a506188fe9659e133dc
[AsmPrinter] __patchable_function_entries: Set SHF_LINK_ORDER for binutils 2.36 and above

This matches GCC behavior when the configure-time binutils is new. GNU ld<2.36
did not support mixed SHF_LINK_ORDER and non-SHF_LINK_ORDER sections in an
output section, so we conservatively disable SHF_LINK_ORDER for <2.36.
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/test/CodeGen/AArch64/patchable-function-entry.ll