From e3312a9d17673972e44fefc49e7f0e3dc96e30bc Mon Sep 17 00:00:00 2001 From: Kenji Aoyama Date: Sat, 6 Oct 2018 23:30:26 +0000 Subject: Insert definitions of environ and __progname in MD_CRT0_START again. That part is not needed with a PIE toolchain, but until gcc 4 on m88k receives enough fixes to produce as good code as gcc 3, the bits in r1.5 are still required. This fixes miniperl does not work correctly while building perl on m88k. Diff is suggested by Miod Vallat, tested by him and me, ok guenther@ --- lib/csu/m88k/md_init.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/csu/m88k/md_init.h b/lib/csu/m88k/md_init.h index e5ec20705aa..217a1a806db 100644 --- a/lib/csu/m88k/md_init.h +++ b/lib/csu/m88k/md_init.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md_init.h,v 1.6 2018/06/16 16:06:03 guenther Exp $ */ +/* $OpenBSD: md_init.h,v 1.7 2018/10/06 23:30:25 aoyama Exp $ */ /* * Copyright (c) 2012 Miodrag Vallat. @@ -46,8 +46,12 @@ * * Our start code starts with two nops because execution may skip up to * two instructions; see setregs() in the kernel for details. + * + * The definitions of environ and __progname prevent the creation + * of COPY relocations for WEAK symbols. */ #define MD_CRT0_START \ + char **environ, *__progname; \ __asm( \ " .text \n" \ " .align 3 \n" \ -- cgit v1.2.3