Skip to content

Commit

Permalink
Merge tag 'compiler-attributes-for-linus-v5.3-rc8' of git://github.co…
Browse files Browse the repository at this point in the history
…m/ojeda/linux

Pull section attribute fix from Miguel Ojeda:
 "Fix Oops in Clang-compiled kernels (Nick Desaulniers)"

* tag 'compiler-attributes-for-linus-v5.3-rc8' of git://github.com/ojeda/linux:
  include/linux/compiler.h: fix Oops for Clang-compiled kernels
  • Loading branch information
Linus Torvalds committed Sep 8, 2019
2 parents def8b72 + bfafddd commit 983f700
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/linux/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
long ______r; \
static struct ftrace_likely_data \
__aligned(4) \
__section("_ftrace_annotated_branch") \
__section(_ftrace_annotated_branch) \
______f = { \
.data.func = __func__, \
.data.file = __FILE__, \
Expand Down Expand Up @@ -60,7 +60,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
#define __trace_if_value(cond) ({ \
static struct ftrace_branch_data \
__aligned(4) \
__section("_ftrace_branch") \
__section(_ftrace_branch) \
__if_trace = { \
.func = __func__, \
.file = __FILE__, \
Expand Down Expand Up @@ -118,7 +118,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
".popsection\n\t"

/* Annotate a C jump table to allow objtool to follow the code flow */
#define __annotate_jump_table __section(".rodata..c_jump_table")
#define __annotate_jump_table __section(.rodata..c_jump_table)

#else
#define annotate_reachable()
Expand Down Expand Up @@ -298,7 +298,7 @@ unsigned long read_word_at_a_time(const void *addr)
* visible to the compiler.
*/
#define __ADDRESSABLE(sym) \
static void * __section(".discard.addressable") __used \
static void * __section(.discard.addressable) __used \
__PASTE(__addressable_##sym, __LINE__) = (void *)&sym;

/**
Expand Down

0 comments on commit 983f700

Please sign in to comment.