From f1703dfbaa221da46f40b698359be2b048e5d6ad Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 5 May 1996 07:56:21 +0000 Subject: Add support to enable libc to be compiled in ELF format. (#ifdef __ELF__) In a nutshell, this macroizes the local/global symbol scoping rules that are different in a.out and ELF. It also makes the i386 assembler stubs conform to i386 PIC calling conventions - the a.out ld.so didn't object, but the ELF one needs it as it implements PIC jumps via PLT's as well as calls. The a.out rtld only worked because it was accidently snooping the grandparent calling function's return address off the stack.. This also affects the libc_r code a little, because of cpp macro nesting. --- lib/libc/gmon/gmon.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/libc/gmon') diff --git a/lib/libc/gmon/gmon.c b/lib/libc/gmon/gmon.c index 572b7eb97e1c3..81e36dd19cd6e 100644 --- a/lib/libc/gmon/gmon.c +++ b/lib/libc/gmon/gmon.c @@ -44,7 +44,11 @@ static char sccsid[] = "@(#)gmon.c 8.1 (Berkeley) 6/4/93"; #include #include +#if defined(__ELF__) +extern char *minbrk asm (".minbrk"); +#else extern char *minbrk asm ("minbrk"); +#endif struct gmonparam _gmonparam = { GMON_PROF_OFF }; -- cgit v1.3