Bug 530532

Summary: elfutils commit curing assertion breaks -ffast-math (crtfastmath.o) when debugedit is run on it.
Product: [Fedora] Fedora Reporter: Peter Alfredsen <loki_val>
Component: elfutilsAssignee: Roland McGrath <roland>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: rawhideCC: lkundrak, mjw, roland
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-03 19:24:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Untouched crtfastmath.o
none
After debugedit with buggy libelf linked in has been over it.
none
diff between rpm5.org trunk debugedit.c and gentoo debugedit.c
none
x86_64 binary, built against gentoo toolchain. Needs libelf and libpopt none

Description Peter Alfredsen 2009-10-23 10:19:19 UTC
Much more info in Gentoo bug 288977

This commit:
fa1d4447b16f16ff9056a24163b175fcbc3a57cf is the first bad commit
commit fa1d4447b16f16ff9056a24163b175fcbc3a57cf
Author: Lubomir Rintel <lkundrak>
Date:   Tue Jul 21 21:04:47 2009 -0700

    Fix handling of gaps between sections when writing files in libelf.

Breaks crtfastmath.o from gcc if debugedit is run on it, causing problems for all programs using the -ffast-math gcc switch:
gcc -ffast-math test.c -o test

/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/crtfastmath.o:(.ctors+0x0): undefined
reference to `no symbol'
collect2: ld gab 1 als Ende-Status zurück

Previously, an assertion would be thrown and debugedit would not be run on the file.

A testscript is attached to the gentoo bug report to reproduce the error.

Comment 1 Peter Alfredsen 2009-10-23 10:23:24 UTC
Created attachment 365828 [details]
Untouched crtfastmath.o

Commandline used to create crtfastmath.o:
gcc     -O2 -g \
        -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition  -isystem -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 \
        -D__GCC_FLOAT_NOT_NEEDED -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o crtfastmath.o -MT crtfastmath.o -MD -MP -msse \
        -minline-all-stringops -c crtfastmath.c

Comment 2 Peter Alfredsen 2009-10-23 10:36:06 UTC
Created attachment 365829 [details]
After debugedit with buggy libelf linked in has been over it.

Commandline used to create the file:
debugedit -b $(pwd) -d chookafluie -l debug crtfastmath.o

Comment 3 Peter Alfredsen 2009-10-23 10:55:41 UTC
Created attachment 365832 [details]
diff between rpm5.org trunk debugedit.c and gentoo debugedit.c

Comment 4 Peter Alfredsen 2009-10-23 10:56:51 UTC
Created attachment 365833 [details]
x86_64 binary, built against gentoo toolchain. Needs libelf and libpopt

Comment 5 Lubomir Rintel 2009-11-03 19:24:18 UTC
I did not know this is already filed, closing as duplicate.

*** This bug has been marked as a duplicate of bug 530704 ***