From: mayeut Date: Fri, 23 Feb 2018 23:02:27 +0000 (+0100) Subject: Make SIMD symbols private for MIPS ELF builds X-Git-Tag: 1.5.90~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6909ab3f7c9c87f779e981b11811f52a8bf58bb;p=libjpeg-turbo Make SIMD symbols private for MIPS ELF builds Closes #210 --- diff --git a/ChangeLog.md b/ChangeLog.md index 93c3e89..7bac416 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -107,6 +107,10 @@ actual security issues, should they arise in the future. algorithm that caused incorrect dithering in the output image. This algorithm now produces bitwise-identical results to the unmerged algorithms. +12. The SIMD function symbols for x86[-64]/ELF, MIPS/ELF, and iOS/ARM[64] +builds are now private. This prevents those symbols from being exposed in +applications or shared libraries that link statically with libjpeg-turbo. + 1.5.3 ===== diff --git a/simd/mips/jsimd_dspr2_asm.h b/simd/mips/jsimd_dspr2_asm.h index 499e34b..8bff9d9 100644 --- a/simd/mips/jsimd_dspr2_asm.h +++ b/simd/mips/jsimd_dspr2_asm.h @@ -2,6 +2,7 @@ * MIPS DSPr2 optimizations for libjpeg-turbo * * Copyright (C) 2013, MIPS Technologies, Inc., California. + * Copyright (C) 2018, Matthieu Darbois. * All Rights Reserved. * Authors: Teodora Novkovic (teodora.novkovic@imgtec.com) * Darko Laus (darko.laus@imgtec.com) @@ -89,11 +90,18 @@ #define f30 $f30 #define f31 $f31 +#ifdef __ELF__ +#define HIDDEN_SYMBOL(symbol) .hidden symbol; +#else +#define HIDDEN_SYMBOL(symbol) +#endif + /* * LEAF_MIPS32R2 - declare leaf routine for MIPS32r2 */ #define LEAF_MIPS32R2(symbol) \ .globl symbol; \ + HIDDEN_SYMBOL(symbol) \ .align 2; \ .type symbol, @function; \ .ent symbol, 0; \