diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-07 17:02:56 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-07 17:02:56 -0500 |
| commit | c688f14ccd4266289fd51e76210c13fdf67f1d9d (patch) | |
| tree | 3bcf79ff8da8e83e7986c3db275261deb20bf10a /tools/objtool/builtin-check.c | |
| parent | 9e91c144e689bb780b412c2c7908b9cf7b96f31f (diff) | |
| parent | 5c51f4ae84df0f9df33ac08aa5be50061a8b4242 (diff) | |
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core fixes from Ingo Molnar:
"A couple of sched.h splitup related build fixes, plus an objtool fix"
* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
objtool: Fix another GCC jump table detection issue
drivers/char/nwbutton: Fix build breakage caused by include file reshuffling
h8300: Fix build breakage caused by header file changes
avr32: Fix build error caused by include file reshuffling
Diffstat (limited to 'tools/objtool/builtin-check.c')
| -rw-r--r-- | tools/objtool/builtin-check.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c index 4cfdbb5b6967..066086dd59a8 100644 --- a/tools/objtool/builtin-check.c +++ b/tools/objtool/builtin-check.c | |||
| @@ -805,11 +805,20 @@ static struct rela *find_switch_table(struct objtool_file *file, | |||
| 805 | insn->jump_dest->offset > orig_insn->offset)) | 805 | insn->jump_dest->offset > orig_insn->offset)) |
| 806 | break; | 806 | break; |
| 807 | 807 | ||
| 808 | /* look for a relocation which references .rodata */ | ||
| 808 | text_rela = find_rela_by_dest_range(insn->sec, insn->offset, | 809 | text_rela = find_rela_by_dest_range(insn->sec, insn->offset, |
| 809 | insn->len); | 810 | insn->len); |
| 810 | if (text_rela && text_rela->sym == file->rodata->sym) | 811 | if (!text_rela || text_rela->sym != file->rodata->sym) |
| 811 | return find_rela_by_dest(file->rodata, | 812 | continue; |
| 812 | text_rela->addend); | 813 | |
| 814 | /* | ||
| 815 | * Make sure the .rodata address isn't associated with a | ||
| 816 | * symbol. gcc jump tables are anonymous data. | ||
| 817 | */ | ||
| 818 | if (find_symbol_containing(file->rodata, text_rela->addend)) | ||
| 819 | continue; | ||
| 820 | |||
| 821 | return find_rela_by_dest(file->rodata, text_rela->addend); | ||
| 813 | } | 822 | } |
| 814 | 823 | ||
| 815 | return NULL; | 824 | return NULL; |
