-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support in gen-vdso-elfn.c.inc for the DT_PPC64_OPT dynamic tag: this is an integer, so does not need relocation. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
- Loading branch information
Showing
12 changed files
with
467 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include $(BUILD_DIR)/tests/tcg/ppc64-linux-user/config-target.mak | ||
|
||
SUBDIR = $(SRC_PATH)/linux-user/ppc | ||
VPATH += $(SUBDIR) | ||
|
||
all: $(SUBDIR)/vdso-32.so $(SUBDIR)/vdso-64.so $(SUBDIR)/vdso-64le.so | ||
|
||
LDFLAGS32 = -nostdlib -shared -Wl,-T,$(SUBDIR)/vdso-32.ld \ | ||
-Wl,-h,linux-vdso32.so.1 -Wl,--hash-style=both -Wl,--build-id=sha1 | ||
LDFLAGS64 = -nostdlib -shared -Wl,-T,$(SUBDIR)/vdso-64.ld \ | ||
-Wl,-h,linux-vdso64.so.1 -Wl,--hash-style=both -Wl,--build-id=sha1 | ||
|
||
$(SUBDIR)/vdso-32.so: vdso.S vdso-32.ld vdso-asmoffset.h | ||
$(CC) -o $@ $(LDFLAGS32) -m32 $< | ||
|
||
$(SUBDIR)/vdso-64.so: vdso.S vdso-64.ld vdso-asmoffset.h | ||
$(CC) -o $@ $(LDFLAGS64) -mbig-endian $< | ||
|
||
$(SUBDIR)/vdso-64le.so: vdso.S vdso-64.ld vdso-asmoffset.h | ||
$(CC) -o $@ $(LDFLAGS64) -mlittle-endian $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Linker script for linux powerpc64 replacement vdso. | ||
* | ||
* Copyright 2023 Linaro, Ltd. | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-or-later | ||
*/ | ||
|
||
VERSION { | ||
LINUX_2.6.15 { | ||
global: | ||
__kernel_gettimeofday; | ||
__kernel_clock_gettime; | ||
__kernel_clock_gettime64; | ||
__kernel_clock_getres; | ||
__kernel_time; | ||
__kernel_sync_dicache; | ||
__kernel_sigtramp32; | ||
__kernel_sigtramp_rt32; | ||
__kernel_getcpu; | ||
local: *; | ||
}; | ||
} | ||
|
||
PHDRS { | ||
phdr PT_PHDR FLAGS(4) PHDRS; | ||
load PT_LOAD FLAGS(7) FILEHDR PHDRS; /* FLAGS=RWX */ | ||
dynamic PT_DYNAMIC FLAGS(4); | ||
eh_frame_hdr PT_GNU_EH_FRAME; | ||
note PT_NOTE FLAGS(4); | ||
} | ||
|
||
SECTIONS { | ||
. = SIZEOF_HEADERS; | ||
|
||
/* | ||
* The following, including the FILEHDRS and PHDRS, are modified | ||
* when we relocate the binary. We want them to be initially | ||
* writable for the relocation; we'll force them read-only after. | ||
*/ | ||
.note : { *(.note*) } :load :note | ||
.dynamic : { *(.dynamic) } :load :dynamic | ||
.dynsym : { *(.dynsym) } :load | ||
.data : { | ||
/* | ||
* There ought not be any real read-write data. | ||
* But since we manipulated the segment layout, | ||
* we have to put these sections somewhere. | ||
*/ | ||
*(.data*) | ||
*(.sdata*) | ||
*(.got.plt) *(.got) | ||
*(.gnu.linkonce.d.*) | ||
*(.bss*) | ||
*(.dynbss*) | ||
*(.gnu.linkonce.b.*) | ||
} | ||
|
||
.rodata : { *(.rodata*) } | ||
.hash : { *(.hash) } | ||
.gnu.hash : { *(.gnu.hash) } | ||
.dynstr : { *(.dynstr) } | ||
.gnu.version : { *(.gnu.version) } | ||
.gnu.version_d : { *(.gnu.version_d) } | ||
.gnu.version_r : { *(.gnu.version_r) } | ||
.eh_frame_hdr : { *(.eh_frame_hdr) } :load :eh_frame_hdr | ||
.eh_frame : { *(.eh_frame) } :load | ||
|
||
.text : { *(.text*) } :load | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Linker script for linux powerpc64 replacement vdso. | ||
* | ||
* Copyright 2023 Linaro, Ltd. | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-or-later | ||
*/ | ||
|
||
VERSION { | ||
LINUX_2.6.15 { | ||
global: | ||
__kernel_gettimeofday; | ||
__kernel_clock_gettime; | ||
__kernel_clock_getres; | ||
__kernel_sync_dicache; | ||
__kernel_sigtramp_rt64; | ||
__kernel_getcpu; | ||
__kernel_time; | ||
local: *; | ||
}; | ||
} | ||
|
||
PHDRS { | ||
phdr PT_PHDR FLAGS(4) PHDRS; | ||
load PT_LOAD FLAGS(7) FILEHDR PHDRS; /* FLAGS=RWX */ | ||
dynamic PT_DYNAMIC FLAGS(4); | ||
eh_frame_hdr PT_GNU_EH_FRAME; | ||
note PT_NOTE FLAGS(4); | ||
} | ||
|
||
SECTIONS { | ||
. = SIZEOF_HEADERS; | ||
|
||
/* | ||
* The following, including the FILEHDRS and PHDRS, are modified | ||
* when we relocate the binary. We want them to be initially | ||
* writable for the relocation; we'll force them read-only after. | ||
*/ | ||
.note : { *(.note*) } :load :note | ||
.dynamic : { *(.dynamic) } :load :dynamic | ||
.dynsym : { *(.dynsym) } :load | ||
.data : { | ||
/* | ||
* There ought not be any real read-write data. | ||
* But since we manipulated the segment layout, | ||
* we have to put these sections somewhere. | ||
*/ | ||
*(.data*) | ||
*(.sdata*) | ||
*(.got.plt) *(.got) | ||
*(.gnu.linkonce.d.*) | ||
*(.bss*) | ||
*(.dynbss*) | ||
*(.gnu.linkonce.b.*) | ||
} | ||
|
||
.rodata : { *(.rodata*) } | ||
.hash : { *(.hash) } | ||
.gnu.hash : { *(.gnu.hash) } | ||
.dynstr : { *(.dynstr) } | ||
.gnu.version : { *(.gnu.version) } | ||
.gnu.version_d : { *(.gnu.version_d) } | ||
.gnu.version_r : { *(.gnu.version_r) } | ||
.eh_frame_hdr : { *(.eh_frame_hdr) } :load :eh_frame_hdr | ||
.eh_frame : { *(.eh_frame) } :load | ||
|
||
.text : { *(.text*) } :load | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Size of dummy stack frame allocated when calling signal handler. | ||
* See arch/powerpc/include/asm/ptrace.h. | ||
*/ | ||
#ifdef TARGET_ABI32 | ||
# define SIGNAL_FRAMESIZE 64 | ||
#else | ||
# define SIGNAL_FRAMESIZE 128 | ||
#endif | ||
|
||
#ifdef TARGET_ABI32 | ||
# define offsetof_sigframe_mcontext 0x20 | ||
# define offsetof_rt_sigframe_mcontext 0x140 | ||
# define offsetof_mcontext_fregs 0xc0 | ||
# define offsetof_mcontext_vregs 0x1d0 | ||
#else | ||
# define offsetof_rt_sigframe_mcontext 0xe8 | ||
# define offsetof_mcontext_fregs 0x180 | ||
# define offsetof_mcontext_vregs_ptr 0x288 | ||
#endif |
Oops, something went wrong.