aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-01-17 16:16:31 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2013-01-17 16:16:31 -0800
commit5361540973da90c1dbde3b4c6c0dab46f997491e (patch)
tree5f295c1d5e218718751846960c50140299be7f0f
parentfcb4cdf5a161495b04a4939297ddc6d8b05cfa20 (diff)
downloadsyslinux-5361540973da90c1dbde3b4c6c0dab46f997491e.tar.gz
syslinux-5361540973da90c1dbde3b4c6c0dab46f997491e.tar.xz
syslinux-5361540973da90c1dbde3b4c6c0dab46f997491e.zip
core: switch LZO decompressor to "fast safe" version
Switch LZO decompressor to the "fast safe" version (and bump LZO source to version 2.06). This allows us to use that decompressor for module compression later without carrying another decompressor. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--core/init.inc6
-rw-r--r--core/lzo/enter.ash3
-rw-r--r--core/lzo/leave.ash3
-rw-r--r--core/lzo/lzo1c_d.ash3
-rw-r--r--core/lzo/lzo1f_d.ash3
-rw-r--r--core/lzo/lzo1x_d.ash3
-rw-r--r--core/lzo/lzo1x_f2.S (renamed from core/lzo/lzo1x_f1.S)15
-rw-r--r--core/lzo/lzo_asm.h23
8 files changed, 42 insertions, 17 deletions
diff --git a/core/init.inc b/core/init.inc
index 5cb8e49a..ae0e6312 100644
--- a/core/init.inc
+++ b/core/init.inc
@@ -45,17 +45,17 @@ common_init:
;
; The code to decompress the PM code and initialize other segments.
;
- extern _lzo1x_decompress_asm_fast
+ extern _lzo1x_decompress_asm_fast_safe
section .textnr
bits 32
pm_decompress:
- push 0 ; Space for decompressed size
+ push __pm_code_len + 16 ; Space for decompressed size
push esp ; Pointer to previous word
push __pm_code_start ; Target address
push dword [lzo_data_size] ; Compressed size
push dword __pm_code_lma
- call _lzo1x_decompress_asm_fast
+ call _lzo1x_decompress_asm_fast_safe
add esp,16
pop RM_EAX ; Decompressed size
diff --git a/core/lzo/enter.ash b/core/lzo/enter.ash
index 49c455d6..c2aa0817 100644
--- a/core/lzo/enter.ash
+++ b/core/lzo/enter.ash
@@ -2,6 +2,9 @@
This file is part of the LZO real-time data compression library.
+ Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
diff --git a/core/lzo/leave.ash b/core/lzo/leave.ash
index 9550b46f..0fdb729f 100644
--- a/core/lzo/leave.ash
+++ b/core/lzo/leave.ash
@@ -2,6 +2,9 @@
This file is part of the LZO real-time data compression library.
+ Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
diff --git a/core/lzo/lzo1c_d.ash b/core/lzo/lzo1c_d.ash
index 9969c86a..56622ab5 100644
--- a/core/lzo/lzo1c_d.ash
+++ b/core/lzo/lzo1c_d.ash
@@ -2,6 +2,9 @@
This file is part of the LZO real-time data compression library.
+ Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
diff --git a/core/lzo/lzo1f_d.ash b/core/lzo/lzo1f_d.ash
index aa9279e0..97a103c0 100644
--- a/core/lzo/lzo1f_d.ash
+++ b/core/lzo/lzo1f_d.ash
@@ -2,6 +2,9 @@
This file is part of the LZO real-time data compression library.
+ Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
diff --git a/core/lzo/lzo1x_d.ash b/core/lzo/lzo1x_d.ash
index aa138354..782b47fe 100644
--- a/core/lzo/lzo1x_d.ash
+++ b/core/lzo/lzo1x_d.ash
@@ -2,6 +2,9 @@
This file is part of the LZO real-time data compression library.
+ Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
diff --git a/core/lzo/lzo1x_f1.S b/core/lzo/lzo1x_f2.S
index 8360e34a..f9ad6b32 100644
--- a/core/lzo/lzo1x_f1.S
+++ b/core/lzo/lzo1x_f2.S
@@ -1,7 +1,10 @@
-/* lzo1x_f1.S -- fast LZO1X decompression in assembler (i386 + gcc)
+/* lzo1x_f2.S -- fast LZO1X decompression in assembler (i386 + gcc)
This file is part of the LZO real-time data compression library.
+ Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
@@ -44,17 +47,21 @@
#define LZO_FAST
+#define LZO_TEST_DECOMPRESS_OVERRUN_INPUT
+#define LZO_TEST_DECOMPRESS_OVERRUN_OUTPUT
+#define LZO_TEST_DECOMPRESS_OVERRUN_LOOKBEHIND
+
#include "lzo_asm.h"
- .section ".textnr","ax"
+ .text
- LZO_PUBLIC(lzo1x_decompress_asm_fast)
+ LZO_PUBLIC(lzo1x_decompress_asm_fast_safe)
#include "enter.ash"
#include "lzo1x_d.ash"
#include "leave.ash"
- LZO_PUBLIC_END(lzo1x_decompress_asm_fast)
+ LZO_PUBLIC_END(lzo1x_decompress_asm_fast_safe)
/*
diff --git a/core/lzo/lzo_asm.h b/core/lzo/lzo_asm.h
index 55fdf6d1..1188dd60 100644
--- a/core/lzo/lzo_asm.h
+++ b/core/lzo/lzo_asm.h
@@ -2,6 +2,9 @@
This file is part of the LZO real-time data compression library.
+ Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
@@ -52,17 +55,17 @@
#else
/* manual configuration - see defaults below */
# if defined(__ELF__)
-# define MFX_ASM_HAVE_TYPE
-# define MFX_ASM_NAME_NO_UNDERSCORES
+# define MFX_ASM_HAVE_TYPE 1
+# define MFX_ASM_NAME_NO_UNDERSCORES 1
# elif defined(__linux__) /* Linux a.out */
-# define MFX_ASM_ALIGN_PTWO
+# define MFX_ASM_ALIGN_PTWO 1
# elif defined(__DJGPP__)
-# define MFX_ASM_ALIGN_PTWO
+# define MFX_ASM_ALIGN_PTWO 1
# elif defined(__GO32__) /* djgpp v1 */
-# define MFX_ASM_CANNOT_USE_EBP
+# define MFX_ASM_CANNOT_USE_EBP 1
# elif defined(__EMX__)
-# define MFX_ASM_ALIGN_PTWO
-# define MFX_ASM_CANNOT_USE_EBP
+# define MFX_ASM_ALIGN_PTWO 1
+# define MFX_ASM_CANNOT_USE_EBP 1
# endif
#endif
#endif
@@ -123,7 +126,7 @@
************************************************************************/
#if !defined(MFX_ASM_ALIGN_BYTES) && !defined(MFX_ASM_ALIGN_PTWO)
-# define MFX_ASM_ALIGN_BYTES
+# define MFX_ASM_ALIGN_BYTES 1
#endif
#if !defined(LZO_ASM_ALIGN)
@@ -145,10 +148,10 @@
#if !defined(MFX_ASM_CANNOT_USE_EBP)
# if 1 && !defined(N_3_EBP) && !defined(N_255_EBP)
-# define N_3_EBP
+# define N_3_EBP 1
# endif
# if 0 && !defined(N_3_EBP) && !defined(N_255_EBP)
-# define N_255_EBP
+# define N_255_EBP 1
# endif
#endif