diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2017-03-24 14:58:58 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-03-24 14:58:58 +0100 |
commit | 2e6d603e5163e6f32a8686744b4d53e8778957ba (patch) | |
tree | ead238ea5efe7b3f52728793fe9dfa76ca52bc31 /tools/objtool/builtin-check.c | |
parent | MAINTAINERS: Add maintianer entry for crypto/s5p-sss (diff) | |
parent | Linux 4.11-rc3 (diff) | |
download | linux-2e6d603e5163e6f32a8686744b4d53e8778957ba.tar.xz linux-2e6d603e5163e6f32a8686744b4d53e8778957ba.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Merging 4.11-rc3 to pick up md5 removal from /dev/random.
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, insn->jump_dest->offset > orig_insn->offset)) break; + /* look for a relocation which references .rodata */ text_rela = find_rela_by_dest_range(insn->sec, insn->offset, insn->len); - if (text_rela && text_rela->sym == file->rodata->sym) - return find_rela_by_dest(file->rodata, - text_rela->addend); + if (!text_rela || text_rela->sym != file->rodata->sym) + continue; + + /* + * Make sure the .rodata address isn't associated with a + * symbol. gcc jump tables are anonymous data. + */ + if (find_symbol_containing(file->rodata, text_rela->addend)) + continue; + + return find_rela_by_dest(file->rodata, text_rela->addend); } return NULL; |