Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189433 - media-libs/libpng-1.2.19 contains TEXTRELs in x86 mmx code
Summary: media-libs/libpng-1.2.19 contains TEXTRELs in x86 mmx code
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-19 08:12 UTC by Christian Heim (RETIRED)
Modified: 2007-09-20 05:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
scanelf-textrel.log (scanelf-textrel.log,9.06 KB, text/plain)
2007-08-19 08:12 UTC, Christian Heim (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Heim (RETIRED) gentoo-dev 2007-08-19 08:12:13 UTC
strip: i686-pc-linux-gnu-strip --strip-unneeded -R .comment
   usr/lib/libpng12.so.0.19.0
   usr/lib/libpng.so.3.19.0
   usr/lib/libpng12.a

 * QA Notice: The following files contain runtime text relocations
 *  Text relocations force the dynamic linker to perform extra
 *  work at startup, waste system resources, and may pose a security
 *  risk.  On some architectures, the code may not even function
 *  properly, if at all.
 *  For more information, see http://hardened.gentoo.org/pic-fix-guide.xml
 *  Please include this file in your report:
 *  /var/tmp/portage/media-libs/libpng-1.2.19/temp/scanelf-textrel.log
 * TEXTREL usr/lib/libpng12.so.0.19.0
TEXTREL usr/lib/libpng.so.3.19.0
Comment 1 Christian Heim (RETIRED) gentoo-dev 2007-08-19 08:12:32 UTC
(miranda) x86/desktop libpng [0] # emerge --info
Portage 2.1.3.6 (hardened/x86/2.6, gcc-4.1.2-vanilla, glibc-2.6.1-r0, 2.6.20-hardened-r5 i686)
=================================================================
System uname: 2.6.20-hardened-r5 i686 Dual Core AMD Opteron(tm) Processor 280
Gentoo Base System release 2.0.0_rc2
Timestamp of tree: Sun, 19 Aug 2007 08:00:01 +0000
dev-lang/python:     2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17-r1
sys-devel/gcc-config: 1.4.0
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=i686 -g -ggdb2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=i686 -g -ggdb2"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg collision-protect distclean distlocks genpkgindex metadata-transfer sandbox sfperms splitdebug strict syncpkg unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distfiles.gentoo.org"
INSTALL_MASK="/usr/share/gtk-doc /usr/kde/*/share/doc /usr/share/doc /usr/lib/debug"
LANG="C"
LC_ALL="C"
LDFLAGS="-Wl,-z,now -Wl,--sort-common"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/phreak/bugfixes /usr/local/portage/phreak/hardened /usr/local/portage/phreak/private"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="berkdb cracklib crypt hardened midi ncurses nptl nptlonly offensive pam perl pic python readline ssl urandom x86 xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Christian Heim (RETIRED) gentoo-dev 2007-08-19 08:12:47 UTC
Created attachment 128545 [details]
scanelf-textrel.log
Comment 3 SpanKY gentoo-dev 2007-08-19 08:39:52 UTC
ugh, new MMX code contains lots of mask loads from variables

pnggccrd.c:
...
static PNG_CONST ull _mask24_0 __attribute__((used, aligned(8))) = 0x2020404040808080LL;
...
png_combine_row():
               __asm__ __volatile__ (
...
                  "movq   " MASK24_0 ", %%mm0 \n\t" // _mask24_0 -> mm0
                  "movq   " MASK24_1 ", %%mm1 \n\t" // _mask24_1 -> mm1
                  "movq   " MASK24_2 ", %%mm2 \n\t" // _mask24_2 -> mm2
...

which of course is bad (objdump -drR):
   209d0:   0f 6f 05 58 3a 02 00    movq   0x23a58,%mm0
            209d3: R_386_RELATIVE   *ABS*
   209d7:   0f 6f 0d 60 3a 02 00    movq   0x23a60,%mm1
            209da: R_386_RELATIVE   *ABS*
   209de:   0f 6f 15 68 3a 02 00    movq   0x23a68,%mm2
            209e1: R_386_RELATIVE   *ABS*
Comment 4 Priit Laes (IRC: plaes) 2007-09-19 14:00:11 UTC
The MMX code has been removed from 1.2.20 version (due to the problems like these..)
So this can be marked as a depending on bug 192119 
Comment 5 SpanKY gentoo-dev 2007-09-20 05:34:03 UTC
should be fixed with libpng-1.2.20