projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17bc339
)
objtool: Warn on stripped section symbol
author
Josh Poimboeuf
<
[email protected]
>
Tue, 30 Jan 2018 04:00:41 +0000
(22:00 -0600)
committer
Ingo Molnar
<
[email protected]
>
Tue, 30 Jan 2018 14:09:23 +0000
(15:09 +0100)
With the following fix:
2a0098d70640
("objtool: Fix seg fault with gold linker")
... a seg fault was avoided, but the original seg fault condition in
objtool wasn't fixed. Replace the seg fault with an error message.
Suggested-by: Ingo Molnar <
[email protected]
>
Signed-off-by: Josh Poimboeuf <
[email protected]
>
Cc: Andy Lutomirski <
[email protected]
>
Cc: Borislav Petkov <
[email protected]
>
Cc: Dave Hansen <
[email protected]
>
Cc: David Woodhouse <
[email protected]
>
Cc: Greg Kroah-Hartman <
[email protected]
>
Cc: Guenter Roeck <
[email protected]
>
Cc: H. Peter Anvin <
[email protected]
>
Cc: Juergen Gross <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Link:
http://lkml.kernel.org/r/dc4585a70d6b975c99fc51d1957ccdde7bd52f3a.1517284349.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <
[email protected]
>
tools/objtool/orc_gen.c
patch
|
blob
|
history
diff --git
a/tools/objtool/orc_gen.c
b/tools/objtool/orc_gen.c
index e61fe703197baa9b21814674c0250f6420e38c93..18384d9be4e170f5d15b5c8981d0a576e1fac87a 100644
(file)
--- a/
tools/objtool/orc_gen.c
+++ b/
tools/objtool/orc_gen.c
@@
-98,6
+98,11
@@
static int create_orc_entry(struct section *u_sec, struct section *ip_relasec,
struct orc_entry *orc;
struct rela *rela;
+ if (!insn_sec->sym) {
+ WARN("missing symbol for section %s", insn_sec->name);
+ return -1;
+ }
+
/* populate ORC data */
orc = (struct orc_entry *)u_sec->data->d_buf + idx;
memcpy(orc, o, sizeof(*orc));