aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <[email protected]>2018-12-19 11:01:43 -0800
committerBorislav Petkov <[email protected]>2019-01-09 11:22:35 +0100
commitd071ae09a4a1414c1433d5ae9908959a7325b0ad (patch)
treecdbc37cd26397e57a30c615f75a2c3bea0c74064 /tools/perf/util/trace-event-scripting.c
parentbfeffd155283772bbe78c6a05dec7c0128ee500c (diff)
x86/build: Mark per-CPU symbols as absolute explicitly for LLD
Accessing per-CPU variables is done by finding the offset of the variable in the per-CPU block and adding it to the address of the respective CPU's block. Section 3.10.8 of ld.bfd's documentation states: For expressions involving numbers, relative addresses and absolute addresses, ld follows these rules to evaluate terms: Other binary operations, that is, between two relative addresses not in the same section, or between a relative address and an absolute address, first convert any non-absolute term to an absolute address before applying the operator." Note that LLVM's linker does not adhere to the GNU ld's implementation and as such requires implicitly-absolute terms to be explicitly marked as absolute in the linker script. If not, it fails currently with: ld.lld: error: ./arch/x86/kernel/vmlinux.lds:153: at least one side of the expression must be absolute ld.lld: error: ./arch/x86/kernel/vmlinux.lds:154: at least one side of the expression must be absolute Makefile:1040: recipe for target 'vmlinux' failed This is not a functional change for ld.bfd which converts the term to an absolute symbol anyways as specified above. Based on a previous submission by Tri Vo <[email protected]>. Reported-by: Dmitry Golovin <[email protected]> Signed-off-by: Rafael Ávila de Espíndola <[email protected]> [ Update commit message per Boris' and Michael's suggestions. ] Signed-off-by: Nick Desaulniers <[email protected]> [ Massage commit message more, fix typos. ] Signed-off-by: Borislav Petkov <[email protected]> Tested-by: Dmitry Golovin <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Brijesh Singh <[email protected]> Cc: Cao Jin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tri Vo <[email protected]> Cc: [email protected] Cc: [email protected] Cc: x86-ml <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions