diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2016-06-30 06:40:25 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-07-04 03:25:22 -0400 |
commit | 46210c440c7b2d32a8ee4e1f0248d0a0b4ad9fa5 (patch) | |
tree | 4647f74f52b56a2024c9b06315472e84a634c3a5 | |
parent | 10f4954ae67b3be6dac3cdfb1e0057c3779542be (diff) |
s390: have unique symbol for __switch_to address
After linking there are several symbols for the same address that the
__switch_to symbol points to. E.g.:
000000000089b9c0 T __kprobes_text_start
000000000089b9c0 T __lock_text_end
000000000089b9c0 T __lock_text_start
000000000089b9c0 T __sched_text_end
000000000089b9c0 T __switch_to
When disassembling with "objdump -d" this results in a missing
__switch_to function. It would be named __kprobes_text_start
instead. To unconfuse objdump add a nop in front of the kprobes text
section. That way __switch_to appears again.
Obviously this solution is sort of a hack, since it also depends on
link order if this works or not. However it is the best I can come up
with for now.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/kernel/entry.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 9a9a35657860..c51650a1ed16 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -163,6 +163,16 @@ _PIF_WORK = (_PIF_PER_TRAP) | |||
163 | .endm | 163 | .endm |
164 | 164 | ||
165 | .section .kprobes.text, "ax" | 165 | .section .kprobes.text, "ax" |
166 | .Ldummy: | ||
167 | /* | ||
168 | * This nop exists only in order to avoid that __switch_to starts at | ||
169 | * the beginning of the kprobes text section. In that case we would | ||
170 | * have several symbols at the same address. E.g. objdump would take | ||
171 | * an arbitrary symbol name when disassembling this code. | ||
172 | * With the added nop in between the __switch_to symbol is unique | ||
173 | * again. | ||
174 | */ | ||
175 | nop 0 | ||
166 | 176 | ||
167 | /* | 177 | /* |
168 | * Scheduler resume function, called by switch_to | 178 | * Scheduler resume function, called by switch_to |