diff options
author | Kenji Aoyama <aoyama@cvs.openbsd.org> | 2018-10-06 23:30:26 +0000 |
---|---|---|
committer | Kenji Aoyama <aoyama@cvs.openbsd.org> | 2018-10-06 23:30:26 +0000 |
commit | e3312a9d17673972e44fefc49e7f0e3dc96e30bc (patch) | |
tree | cc6c33b9f488d56ec99f33f099753d3b1a3c1bb3 /lib | |
parent | 215b808acf4bb204e6fb04ceed5b1d6571714739 (diff) |
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@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csu/m88k/md_init.h | 6 |
1 files changed, 5 insertions, 1 deletions
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" \ |