[openfirmware] [commit] r1775 - cpu/x86/Linux forth/wrapper/zip
repository service
svn at openfirmware.info
Mon Apr 5 05:54:49 CEST 2010
Author: wmb
Date: Mon Apr 5 05:54:49 2010
New Revision: 1775
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1775
Log:
Patch from Cortland Setlow to allow the uses of -O3 for compiling the inflater, thus making it run 2.5x faster.
Added:
cpu/x86/Linux/inflate.ld
Modified:
cpu/x86/Linux/Makefile
forth/wrapper/zip/inflate.c
Modified: cpu/x86/Linux/Makefile
==============================================================================
--- cpu/x86/Linux/Makefile Thu Mar 18 19:21:33 2010 (r1774)
+++ cpu/x86/Linux/Makefile Mon Apr 5 05:54:49 2010 (r1775)
@@ -30,11 +30,11 @@
${CC} -m32 -o $@ ${OBJS} ${LIBS}
@ln -sf forth x86forth
-# Compile with -O0 because with GCC4, higher optimization levels cause the
-# functions to be reordered so the "inflate" entry point is no longer at
-# the beginning.
-inflate.o: ${ZIPDIR}/inflate.c
- ${CC} -c -m32 -O0 -fpic $< -o $@
+inflate.lo: ${ZIPDIR}/inflate.c
+ ${CC} -c -m32 -Wall -fno-stack-protector -ffreestanding -D_FORTIFY_SOURCE=0 -DNEED_BCOPY -O3 -fpic $< -o $@
+
+inflate.o: inflate.lo
+ ${LD} -T inflate.ld $< -o $@
../build/inflate.bin: inflate.o
objcopy -O binary $< $@
Added: cpu/x86/Linux/inflate.ld
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ cpu/x86/Linux/inflate.ld Mon Apr 5 05:54:49 2010 (r1775)
@@ -0,0 +1,7 @@
+SECTIONS
+{
+ . = 0x00000;
+ .text : { *(.text_inflate) }
+ .text_spare : { *(.text) }
+}
+
Modified: forth/wrapper/zip/inflate.c
==============================================================================
--- forth/wrapper/zip/inflate.c Thu Mar 18 19:21:33 2010 (r1774)
+++ forth/wrapper/zip/inflate.c Mon Apr 5 05:54:49 2010 (r1775)
@@ -172,10 +172,10 @@
* Return size of clear.
*/
int
-inflate(wsptr, nohdr, clear, compr)
-struct workspace *wsptr;
-int nohdr;
-u_char *clear, *compr;
+inflate(struct workspace *wsptr, int nohdr, u_char* clear, u_char *compr) __attribute__((section ("text_inflate")));
+
+int
+inflate(struct workspace *wsptr, int nohdr, u_char* clear, u_char *compr)
{
int n;
int flags;
More information about the openfirmware
mailing list