> Date: Fri, 11 Aug 2017 10:13:16 -0700
> From: Philip Guenther <[email protected]>
>
> The _dl_printf() used to be used in libexec/ld.so/*/archdep.h if an
> unexpected type of relocation was encountered in ld.so itself. Those went
> away (we test ld.so before installing it; _dl_exit() is enough) so the
> static pie bits in lib/csu/*/md_init.h no longer need to supply a
> no-op _dl_printf() stub.
>
> ok?
ok kettenis@
> Index: aarch64/md_init.h
> ===================================================================
> RCS file: /data/src/openbsd/src/lib/csu/aarch64/md_init.h,v
> retrieving revision 1.3
> diff -u -p -r1.3 md_init.h
> --- aarch64/md_init.h 26 Feb 2017 22:26:42 -0000 1.3
> +++ aarch64/md_init.h 8 Jun 2017 06:16:41 -0000
> @@ -113,6 +113,4 @@
> "_dl_exit: \n" \
> " mov x8, #1 \n" \
> " svc #0 \n" \
> - "_dl_printf: \n" \
> - " ret \n" \
> ".previous");
> Index: alpha/md_init.h
> ===================================================================
> RCS file: /data/src/openbsd/src/lib/csu/alpha/md_init.h,v
> retrieving revision 1.8
> diff -u -p -r1.8 md_init.h
> --- alpha/md_init.h 19 Jan 2017 23:47:04 -0000 1.8
> +++ alpha/md_init.h 31 Jan 2017 08:52:37 -0000
> @@ -102,10 +102,6 @@
> "_dl_exit: \n" \
> " lda $0, 1 \n" \
> " callsys \n" \
> - " ret \n" \
> - ".globl _dl_printf \n" \
> - ".type _dl_printf@function \n" \
> - "_dl_printf: \n" \
> " ret")
>
> #define MD_START_ARGS char **sp, void (*cleanup)(void)
> Index: arm/md_init.h
> ===================================================================
> RCS file: /data/src/openbsd/src/lib/csu/arm/md_init.h,v
> retrieving revision 1.11
> diff -u -p -r1.11 md_init.h
> --- arm/md_init.h 26 Feb 2017 15:20:58 -0000 1.11
> +++ arm/md_init.h 8 Jun 2017 06:16:41 -0000
> @@ -157,6 +157,4 @@
> "_dl_exit: \n" \
> " mov r12, #1 \n" \
> " swi #0 \n" \
> - "_dl_printf: \n" \
> - " mov pc, lr \n" \
> ".previous");
> Index: hppa/md_init.h
> ===================================================================
> RCS file: /data/src/openbsd/src/lib/csu/hppa/md_init.h,v
> retrieving revision 1.12
> diff -u -p -r1.12 md_init.h
> --- hppa/md_init.h 26 Feb 2017 22:26:42 -0000 1.12
> +++ hppa/md_init.h 8 Jun 2017 06:16:41 -0000
> @@ -156,17 +156,6 @@
> "1: bv %r0(%rp) \n" \
> " sub %r0, %ret0, %ret0 \n" \
> " .exit \n" \
> - " .procend \n" \
> - " .export _dl_printf, entry \n" \
> - " .type _dl_printf,@function \n" \
> - " .label _dl_printf \n" \
> - " .proc \n" \
> - " .callinfo frame=0, calls \n" \
> - " .entry \n" \
> - "_dl_printf: \n" \
> - " bv %r0(%rp) \n" \
> - " nop \n" \
> - " .exit \n" \
> " .procend")
>
>
> Index: i386/md_init.h
> ===================================================================
> RCS file: /data/src/openbsd/src/lib/csu/i386/md_init.h,v
> retrieving revision 1.8
> diff -u -p -r1.8 md_init.h
> --- i386/md_init.h 7 Aug 2016 02:30:55 -0000 1.8
> +++ i386/md_init.h 31 Jan 2017 08:53:28 -0000
> @@ -118,14 +118,6 @@
> " xorl %ebp,%ebp # mark deepest stack frame\n" \
> " call ___start # ___start(argc,argv,envp,0) \n" \
> " \n" \
> - ".text \n" \
> - " .align 4 \n" \
> - " .globl _dl_printf \n" \
> - " .type _dl_printf,@function \n" \
> - "_dl_printf: \n" \
> - " ret \n" \
> - " \n" \
> - ".text \n" \
> " .align 4 \n" \
> " .globl _dl_exit \n" \
> " .type _dl_exit,@function \n" \
> Index: mips64/md_init.h
> ===================================================================
> RCS file: /data/src/openbsd/src/lib/csu/mips64/md_init.h,v
> retrieving revision 1.14
> diff -u -p -r1.14 md_init.h
> --- mips64/md_init.h 7 Aug 2016 02:44:00 -0000 1.14
> +++ mips64/md_init.h 31 Jan 2017 08:53:36 -0000
> @@ -145,12 +145,6 @@
> " syscall \n" \
> " j $ra \n" \
> " .end _dl_exit \n" \
> - " .globl _dl_printf \n" \
> - " .ent _dl_printf \n" \
> - " .type _dl_printf, @function \n" \
> - "_dl_printf: \n" \
> - " j $ra \n" \
> - " .end _dl_printf \n" \
> " .previous")
>
> struct kframe {
> Index: powerpc/md_init.h
> ===================================================================
> RCS file: /data/src/openbsd/src/lib/csu/powerpc/md_init.h,v
> retrieving revision 1.8
> diff -u -p -r1.8 md_init.h
> --- powerpc/md_init.h 20 Mar 2016 02:32:39 -0000 1.8
> +++ powerpc/md_init.h 31 Jan 2017 08:53:54 -0000
> @@ -129,11 +129,4 @@ __asm(
> \
> " li %r0, " STR(SYS_exit) " \n" \
> " sc \n" \
> " blr \n" \
> -" \n" \
> -" .text \n" \
> -" .align 2 \n" \
> -" .globl _dl_printf \n" \
> -" .type _dl_printf, @function \n" \
> -"_dl_printf: \n" \
> -" blr \n" \
> )
> Index: sh/md_init.h
> ===================================================================
> RCS file: /data/src/openbsd/src/lib/csu/sh/md_init.h,v
> retrieving revision 1.7
> diff -u -p -r1.7 md_init.h
> --- sh/md_init.h 19 Jan 2017 23:47:04 -0000 1.7
> +++ sh/md_init.h 31 Jan 2017 08:54:04 -0000
> @@ -131,13 +131,6 @@ __asm(".section " #section "\n" \
> " .long _DYNAMIC - .L_offbase \n" \
> \
> " .align 2 \n" \
> - " .globl _dl_printf \n" \
> - " .type _dl_printf,@function \n" \
> - "_dl_printf: \n" \
> - " rts \n" \
> - " nop \n" \
> - \
> - " .align 2 \n" \
> " .globl _dl_exit \n" \
> " .type _dl_exit,@function \n" \
> "_dl_exit: \n" \
> Index: sparc64/md_init.h
> ===================================================================
> RCS file: /data/src/openbsd/src/lib/csu/sparc64/md_init.h,v
> retrieving revision 1.6
> diff -u -p -r1.6 md_init.h
> --- sparc64/md_init.h 20 Mar 2016 02:32:39 -0000 1.6
> +++ sparc64/md_init.h 31 Jan 2017 08:54:58 -0000
> @@ -101,11 +101,6 @@
> " ba,pt %icc, ___start \n" \
> " clr %o1 \n" \
> " \n" \
> - " .global _dl_printf \n" \
> - "_dl_printf: \n" \
> - " retl \n" \
> - " nop \n" \
> - " \n" \
> " .global _dl_exit \n" \
> "_dl_exit: \n" \
> " mov 0x401, %g1 \n" \
>
>