Gentoo Archives: gentoo-hardened

From: "René Rhéaume" <rene.rheaume@×××××.com>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] removing .text relocations from mplayer and xine-lib
Date: Mon, 30 May 2005 16:49:02
Message-Id: 35572ca805053009496fcff614@mail.gmail.com
In Reply to: Re: [gentoo-hardened] removing .text relocations from mplayer and xine-lib by Ned Ludd
1 I found out symlinking libtool-nofpic to libtool (which produces PIC
2 binaries) eliminates most of the relocations. I am able to build on
3 Gentoo either outside Portage or using my custom ebuild.
4
5 Just add "use x86 && has_pic && ln -sf libtool ${S}/libtool-nofpic"
6 right after econf. You can also comment RESTRICT="nostrip" in the
7 ebuild and add "strict" to your FEATURES to get the list of the
8 remaining TEXTREL binaries, which are on my system:
9
10 $(get-libdir)/xine/plugins/${PV}/post/xineplug_post_{planar,tvtime}.so
11 $(get-libdir)/xine/plugins/${PV}/xineplug_decode_{ff,w32dll,qt}.so
12
13 Feedback from other architectures is appreciated.
14
15 Also, it seems that "use x86 && has_pic && append-flags -UHAVE_MMX" is
16 not needed. I can build fine either with or without.
17
18 *This paragraph is more a note to myself, but can be interesting for
19 those with older gcc versions*
20 I also tried this symlinking trick on my half-Mandr* install and got
21 two build errors (make -k). It is probably a bug from that old
22 gcc-3.2-1mdk I get as I already have to patch xine-lib to disable SIMD
23 code generation in FAAD code even when I generate non-PIC code.
24 Faulty files are:
25 ${S}/src/libffmpeg/libavcodec/i386/mpegvideo_mmx_template.c
26 ${S}/src/libffmpeg/libavcodec/libpostproc/postprocess_template.c
27 Error message: can't find a register in class `GENERAL_REGS' while
28 reloading `asm'
29
30 OS Specs:
31 * Gentoo 2004.3, x86, hardened, µclibc 0.9.27, running kernel
32 2.4.30-hardened-r1, with Hardened GCC 3.3.5-r1
33 * half-Mandr* 9.0, i586, glibc 2.2.5, running kernel 2.4.28-19rrsecure
34 (lck+grsec+i2c+security fixes, mainly), with GCC 3.2-1mdk
35
36 --
37 gentoo-hardened@g.o mailing list

Replies

Subject Author
Re: [gentoo-hardened] removing .text relocations from mplayer and xine-lib "Peter S. Mazinger" <ps.m@×××.net>