Skip to content

Commit

Permalink
sh: Terminate .eh_frame in VDSO with a 4-byte 0.
Browse files Browse the repository at this point in the history
It's assumed that .eh_frame is terminated with 4-byte 0 in shared
libraries and executable.  It seems to be the case for VDSOs too.
Without this terminator, I saw failures when unwinding from VDSO,
though I don't know how other architectures handle this issue.
For the normal libs, crtendS.o gives this terminator.  We can use
such terminating objects.  Or we can add a 4-byte 0 with modifying
the linker script like as the patch below.

Signed-off-by: Kaz Kojima <kkojima@rr.iij4u.or.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Kaz Kojima authored and Paul Mundt committed Nov 2, 2007
1 parent 236b195 commit f38c5a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/sh/kernel/vsyscall/vsyscall.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ SECTIONS
.text : { *(.text) } :text =0x90909090
.note : { *(.note.*) } :text :note
.eh_frame_hdr : { *(.eh_frame_hdr ) } :text :eh_frame_hdr
.eh_frame : { KEEP (*(.eh_frame)) } :text
.eh_frame : {
KEEP (*(.eh_frame))
LONG (0)
} :text
.dynamic : { *(.dynamic) } :text :dynamic
.useless : {
*(.got.plt) *(.got)
Expand Down

0 comments on commit f38c5a6

Please sign in to comment.