>From c2fd025acba7fc191dff2b3f343912c2a9d06e20 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 20 Oct 2019 14:32:20 -0400 Subject: [PATCH 07/17] add __dlsym_time64 asm entry point for all legacy-32bit-time_t archs these were produced programmatically via trivial sed on the corresponding dlsym.s files. --- src/ldso/arm/dlsym_time64.s | 8 ++++++++ src/ldso/i386/dlsym_time64.s | 11 +++++++++++ src/ldso/m68k/dlsym_time64.s | 12 ++++++++++++ src/ldso/microblaze/dlsym_time64.s | 6 ++++++ src/ldso/mips/dlsym_time64.s | 17 +++++++++++++++++ src/ldso/mipsn32/dlsym_time64.s | 17 +++++++++++++++++ src/ldso/or1k/dlsym_time64.s | 6 ++++++ src/ldso/powerpc/dlsym_time64.s | 8 ++++++++ src/ldso/sh/dlsym_time64.s | 11 +++++++++++ 9 files changed, 96 insertions(+) create mode 100644 src/ldso/arm/dlsym_time64.s create mode 100644 src/ldso/i386/dlsym_time64.s create mode 100644 src/ldso/m68k/dlsym_time64.s create mode 100644 src/ldso/microblaze/dlsym_time64.s create mode 100644 src/ldso/mips/dlsym_time64.s create mode 100644 src/ldso/mipsn32/dlsym_time64.s create mode 100644 src/ldso/or1k/dlsym_time64.s create mode 100644 src/ldso/powerpc/dlsym_time64.s create mode 100644 src/ldso/sh/dlsym_time64.s diff --git a/src/ldso/arm/dlsym_time64.s b/src/ldso/arm/dlsym_time64.s new file mode 100644 index 00000000..8edd7e5b --- /dev/null +++ b/src/ldso/arm/dlsym_time64.s @@ -0,0 +1,8 @@ +.syntax unified +.text +.global __dlsym_time64 +.hidden __dlsym_redir_time64 +.type __dlsym_time64,%function +__dlsym_time64: + mov r2,lr + b __dlsym_redir_time64 diff --git a/src/ldso/i386/dlsym_time64.s b/src/ldso/i386/dlsym_time64.s new file mode 100644 index 00000000..6a004434 --- /dev/null +++ b/src/ldso/i386/dlsym_time64.s @@ -0,0 +1,11 @@ +.text +.global __dlsym_time64 +.hidden __dlsym_redir_time64 +.type __dlsym_time64,@function +__dlsym_time64: + push (%esp) + push 12(%esp) + push 12(%esp) + call __dlsym_redir_time64 + add $12,%esp + ret diff --git a/src/ldso/m68k/dlsym_time64.s b/src/ldso/m68k/dlsym_time64.s new file mode 100644 index 00000000..8540e113 --- /dev/null +++ b/src/ldso/m68k/dlsym_time64.s @@ -0,0 +1,12 @@ +.text +.global __dlsym_time64 +.hidden __dlsym_redir_time64 +.type __dlsym_time64,@function +__dlsym_time64: + move.l (%sp),-(%sp) + move.l 12(%sp),-(%sp) + move.l 12(%sp),-(%sp) + lea __dlsym_redir_time64-.-8,%a1 + jsr (%pc,%a1) + add.l #12,%sp + rts diff --git a/src/ldso/microblaze/dlsym_time64.s b/src/ldso/microblaze/dlsym_time64.s new file mode 100644 index 00000000..83e68e30 --- /dev/null +++ b/src/ldso/microblaze/dlsym_time64.s @@ -0,0 +1,6 @@ +.global __dlsym_time64 +.hidden __dlsym_redir_time64 +.type __dlsym_time64,@function +__dlsym_time64: + brid __dlsym_redir_time64 + add r7, r15, r0 diff --git a/src/ldso/mips/dlsym_time64.s b/src/ldso/mips/dlsym_time64.s new file mode 100644 index 00000000..20ba674a --- /dev/null +++ b/src/ldso/mips/dlsym_time64.s @@ -0,0 +1,17 @@ +.set noreorder +.global __dlsym_time64 +.hidden __dlsym_redir_time64 +.type __dlsym_time64,@function +__dlsym_time64: + lui $gp, %hi(_gp_disp) + addiu $gp, %lo(_gp_disp) + addu $gp, $gp, $25 + move $6, $ra + lw $25, %call16(__dlsym_redir_time64)($gp) + addiu $sp, $sp, -16 + sw $ra, 12($sp) + jalr $25 + nop + lw $ra, 12($sp) + jr $ra + addiu $sp, $sp, 16 diff --git a/src/ldso/mipsn32/dlsym_time64.s b/src/ldso/mipsn32/dlsym_time64.s new file mode 100644 index 00000000..3dc9c18c --- /dev/null +++ b/src/ldso/mipsn32/dlsym_time64.s @@ -0,0 +1,17 @@ +.set noreorder +.global __dlsym_time64 +.hidden __dlsym_redir_time64 +.type __dlsym_time64,@function +__dlsym_time64: + lui $3, %hi(%neg(%gp_rel(__dlsym_time64))) + addiu $3, $3, %lo(%neg(%gp_rel(__dlsym_time64))) + addu $3, $3, $25 + move $6, $ra + lw $25, %got_disp(__dlsym_redir_time64)($3) + addiu $sp, $sp, -32 + sd $ra, 16($sp) + jalr $25 + nop + ld $ra, 16($sp) + jr $ra + addiu $sp, $sp, 32 diff --git a/src/ldso/or1k/dlsym_time64.s b/src/ldso/or1k/dlsym_time64.s new file mode 100644 index 00000000..ea168378 --- /dev/null +++ b/src/ldso/or1k/dlsym_time64.s @@ -0,0 +1,6 @@ +.global __dlsym_time64 +.hidden __dlsym_redir_time64 +.type __dlsym_time64,@function +__dlsym_time64: + l.j __dlsym_redir_time64 + l.ori r5, r9, 0 diff --git a/src/ldso/powerpc/dlsym_time64.s b/src/ldso/powerpc/dlsym_time64.s new file mode 100644 index 00000000..ddc30985 --- /dev/null +++ b/src/ldso/powerpc/dlsym_time64.s @@ -0,0 +1,8 @@ + .text + .global __dlsym_time64 + .hidden __dlsym_redir_time64 + .type __dlsym_time64,@function +__dlsym_time64: + mflr 5 # The return address is arg3. + b __dlsym_redir_time64 + .size __dlsym_time64, .-dlsym diff --git a/src/ldso/sh/dlsym_time64.s b/src/ldso/sh/dlsym_time64.s new file mode 100644 index 00000000..785e23ed --- /dev/null +++ b/src/ldso/sh/dlsym_time64.s @@ -0,0 +1,11 @@ +.text +.global __dlsym_time64 +.hidden __dlsym_redir_time64 +.type __dlsym_time64, @function +__dlsym_time64: + mov.l L1, r0 +1: braf r0 + mov.l @r15, r6 + +.align 2 +L1: .long __dlsym_redir_time64@PLT-(1b+4-.) -- 2.21.0