* egcs-971023 cannot compile linux ld.so-1.9.5
@ 1997-10-30 0:49 Szalkai Akos
1997-10-30 20:16 ` H.J. Lu
0 siblings, 1 reply; 2+ messages in thread
From: Szalkai Akos @ 1997-10-30 0:49 UTC (permalink / raw)
To: egcs
Hi,
The details: cc1 (from egcs-9710{16,23}, haven't checked others) fails
with a 'forbidden register spilled' (from reload1.c) error while
compiling d-link/boot1.c. gcc-2.7.2.3 correctly compiles it.
Looking around the optimization options, it seems that the compiler
only fails when both -fPIC (or -fpic) and -finline are on. (But ld.so
does not work with either of them turned off.)
If you need more details, tell me.
Akos
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: egcs-971023 cannot compile linux ld.so-1.9.5
1997-10-30 0:49 egcs-971023 cannot compile linux ld.so-1.9.5 Szalkai Akos
@ 1997-10-30 20:16 ` H.J. Lu
0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 1997-10-30 20:16 UTC (permalink / raw)
To: Szalkai Akos; +Cc: egcs
>
> Hi,
>
> The details: cc1 (from egcs-9710{16,23}, haven't checked others) fails
> with a 'forbidden register spilled' (from reload1.c) error while
> compiling d-link/boot1.c. gcc-2.7.2.3 correctly compiles it.
>
> Looking around the optimization options, it seems that the compiler
> only fails when both -fPIC (or -fpic) and -finline are on. (But ld.so
> does not work with either of them turned off.)
>
> If you need more details, tell me.
>
> Akos
>
>
The bug is in ld.so. Please try this patch.
--
H.J. Lu (hjl@gnu.ai.mit.edu)
--
Index: d-link/Makefile
===================================================================
RCS file: /home/work/cvs/linux/ld-so/d-link/Makefile,v
retrieving revision 1.1.1.2
retrieving revision 1.5
diff -u -r1.1.1.2 -r1.5
Index: d-link/i386/syscall.h
===================================================================
RCS file: /home/work/cvs/linux/ld-so/d-link/i386/syscall.h,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- syscall.h 1997/03/31 19:33:06 1.1.1.2
+++ syscall.h 1997/07/10 03:37:18 1.2
@@ -87,20 +87,21 @@
"rm" (addr), "rm" (size), "rm" (prot), "rm" (flags),
"rm" (fd), "rm" (f_offset));
#else
+ unsigned long buffer[6];
+
+ buffer[0] = (unsigned long)addr;
+ buffer[1] = (unsigned long)size;
+ buffer[2] = (unsigned long)prot;
+ buffer[3] = (unsigned long)flags;
+ buffer[4] = (unsigned long)fd;
+ buffer[5] = (unsigned long)f_offset;
+
__asm__ volatile ("pushl %%ebx\n\t" \
- "pushl %7\n\t" \
- "pushl %6\n\t" \
- "pushl %5\n\t" \
- "pushl %4\n\t" \
- "pushl %3\n\t" \
- "pushl %2\n\t" \
- "movl %%esp,%%ebx\n\t" \
+ "movl %%ecx,%%ebx\n\t" \
"int $0x80\n\t" \
- "addl $24,%%esp\n\t" \
"popl %%ebx\n" \
: "=a" (malloc_buffer) : "a" (__NR_mmap),
- "rm" (addr), "rm" (size), "rm" (prot), "rm" (flags),
- "rm" (fd), "rm" (f_offset));
+ "c" (buffer));
#endif
return malloc_buffer;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-10-30 20:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-30 0:49 egcs-971023 cannot compile linux ld.so-1.9.5 Szalkai Akos
1997-10-30 20:16 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).