- Make a few functions hidden, to try and avoid textrels

- Disable optimisations on x86 for the same reason (#285961)
This commit is contained in:
Bastien Nocera 2007-09-12 21:05:16 +00:00
parent ba98f85723
commit e9cc3f4e64
2 changed files with 45 additions and 2 deletions

View File

@ -53,3 +53,38 @@ diff -upr flac-1.2.0.orig/src/libFLAC/ia32/stream_encoder_asm.nasm flac-1.2.0/sr
- section .note.GNU-stack noalloc - section .note.GNU-stack noalloc
-%endif -%endif
+section .note.GNU-stack progbits noalloc noexec nowrite align=1 +section .note.GNU-stack progbits noalloc noexec nowrite align=1
diff -upr flac-1.2.0/src/libFLAC/bitreader.c flac-1.2.0.new/src/libFLAC/bitreader.c
--- flac-1.2.0/src/libFLAC/bitreader.c 2007-07-23 17:14:35.000000000 +0100
+++ flac-1.2.0.new/src/libFLAC/bitreader.c 2007-09-12 18:15:30.000000000 +0100
@@ -203,6 +203,7 @@ static FLaC__INLINE void crc16_update_wo
}
/* would be static except it needs to be called by asm routines */
+ __attribute__((__visibility__("hidden")))
FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br)
{
unsigned start, end;
diff -upr flac-1.2.0/src/libFLAC/crc.c flac-1.2.0.new/src/libFLAC/crc.c
--- flac-1.2.0/src/libFLAC/crc.c 2007-02-02 06:58:22.000000000 +0000
+++ flac-1.2.0.new/src/libFLAC/crc.c 2007-09-12 18:13:44.000000000 +0100
@@ -73,7 +73,7 @@ FLAC__byte const FLAC__crc8_table[256] =
};
/* CRC-16, poly = x^16 + x^15 + x^2 + x^0, init = 0 */
-
+__attribute__((__visibility__("hidden")))
unsigned FLAC__crc16_table[256] = {
0x0000, 0x8005, 0x800f, 0x000a, 0x801b, 0x001e, 0x0014, 0x8011,
0x8033, 0x0036, 0x003c, 0x8039, 0x0028, 0x802d, 0x8027, 0x0022,
diff -upr flac-1.2.0/src/libFLAC/bitreader.c flac-1.2.0.new/src/libFLAC/bitreader.c
--- flac-1.2.0/src/libFLAC/bitreader.c 2007-09-12 18:17:56.000000000 +0100
+++ flac-1.2.0.new/src/libFLAC/bitreader.c 2007-09-12 19:09:00.000000000 +0100
@@ -774,6 +774,7 @@ FLaC__INLINE FLAC__bool FLAC__bitreader_
}
#endif
+ __attribute__((__visibility__("hidden")))
FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader *br, int *val, unsigned parameter)
{
FLAC__uint32 lsbs = 0, msbs = 0;

View File

@ -1,7 +1,7 @@
Summary: An encoder/decoder for the Free Lossless Audio Codec Summary: An encoder/decoder for the Free Lossless Audio Codec
Name: flac Name: flac
Version: 1.2.0 Version: 1.2.0
Release: 2%{?dist} Release: 3%{?dist}
License: LGPL/GPL License: LGPL/GPL
Group: Applications/Multimedia Group: Applications/Multimedia
Source: http://prdownloads.sourceforge.net/flac/flac-%{version}.tar.gz Source: http://prdownloads.sourceforge.net/flac/flac-%{version}.tar.gz
@ -36,8 +36,11 @@ will use the Free Lossless Audio Codec.
%patch1 -p1 -b .gnu-stack %patch1 -p1 -b .gnu-stack
%build %build
export XMMS_CONFIG=no # Disable XMMS %ifarch %{ix86}
%configure --with-pic --disable-xmms-plugin --disable-asm-optimizations
%else
%configure --with-pic --disable-xmms-plugin %configure --with-pic --disable-xmms-plugin
%endif
make %{?_smp_mflags} make %{?_smp_mflags}
@ -72,6 +75,11 @@ rm -rf %{buildroot}
%{_datadir}/aclocal/*.m4 %{_datadir}/aclocal/*.m4
%changelog %changelog
* Wed Sep 12 2007 - Bastien Nocera <bnocera@redhat.com> - 1.2.0-3
- Make a few functions hidden, to try and avoid textrels
- Disable optimisations on x86 for the same reason
(#285961)
* Tue Sep 11 2007 - Bastien Nocera <bnocera@redhat.com> - 1.2.0-2 * Tue Sep 11 2007 - Bastien Nocera <bnocera@redhat.com> - 1.2.0-2
- Update GNU stack patch to cover all the NASM sources used - Update GNU stack patch to cover all the NASM sources used