Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1736114 - binutils: ld -Map --gc-sections results in corrupt ELF build attribute notes
Summary: binutils: ld -Map --gc-sections results in corrupt ELF build attribute notes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F31FTBFS 1732841
TreeView+ depends on / blocked
 
Reported: 2019-08-01 14:46 UTC by Fedora Release Engineering
Modified: 2020-11-12 17:10 UTC (History)
9 users (show)

Fixed In Version: binutils-2.32-21.fc31
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-12 17:10:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log (32.00 KB, text/plain)
2019-08-01 14:46 UTC, Fedora Release Engineering
no flags Details
root.log (32.00 KB, text/plain)
2019-08-01 14:46 UTC, Fedora Release Engineering
no flags Details
state.log (633 bytes, text/plain)
2019-08-01 14:46 UTC, Fedora Release Engineering
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Sourceware 24721 0 P2 RESOLVED -Map generates corrupt .note.gnu.property section 2020-11-12 17:08:20 UTC
Sourceware 24874 0 P2 RESOLVED ld: --gc-sections reorders GNU build attributes 2020-11-12 17:08:20 UTC

Description Fedora Release Engineering 2019-08-01 14:46:48 UTC
micropython failed to build from source in Fedora rawhide/f31

https://koji.fedoraproject.org/koji/taskinfo?taskID=36635537


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Please fix micropython at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
micropython will be orphaned. Before branching of Fedora 32,
micropython will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://fedoraproject.org/wiki/Fails_to_build_from_source

Comment 1 Fedora Release Engineering 2019-08-01 14:46:52 UTC
Created attachment 1597742 [details]
build.log

file build.log too big, will only attach last 32768 bytes

Comment 2 Fedora Release Engineering 2019-08-01 14:46:54 UTC
Created attachment 1597743 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Fedora Release Engineering 2019-08-01 14:46:56 UTC
Created attachment 1597744 [details]
state.log

Comment 4 Miro Hrončok 2019-08-01 15:30:32 UTC
According to koschei, this started with:

 binutils
  2.32-17.fc31
  2.32-18.fc31

 glibc
  2.29.9000-32.fc31
  2.29.9000-34.fc31

 glibc-devel
  2.29.9000-32.fc31
  2.29.9000-34.fc31

 util-linux
  2.34-1.fc31
  2.34-2.fc31

 ncurses-devel
  6.1-10.20180923.fc30
  6.1-11.20190720.fc31

 gawk
  5.0.1-3.fc31
  5.0.1-4.fc31

 libblkid
  2.34-1.fc31
  2.34-2.fc31

 glibc-common
  2.29.9000-32.fc31
  2.29.9000-34.fc31

 python-pip-wheel
  19.1.1-1.fc31
  19.1.1-3.fc31

 binutils-gold
  2.32-17.fc31
  2.32-18.fc31

 glibc-headers
  2.29.9000-32.fc31
  2.29.9000-34.fc31

 libfdisk
  2.34-1.fc31
  2.34-2.fc31

 ncurses
  6.1-10.20180923.fc30
  6.1-11.20190720.fc31

 libuuid
  2.34-1.fc31
  2.34-2.fc31

 libsmartcols
  2.34-1.fc31
  2.34-2.fc31

 libmount
  2.34-1.fc31
  2.34-2.fc31

 pcre2
  10.33-8.fc31
  10.33-9.fc31

 glibc-minimal-langpack
  2.29.9000-32.fc31
  2.29.9000-34.fc31

 ncurses-c++-libs
  6.1-10.20180923.fc30
  6.1-11.20190720.fc31

 ncurses-libs
  6.1-10.20180923.fc30
  6.1-11.20190720.fc31

 kernel-headers
  5.3.0-0.rc0.git7.1....
  5.3.0-0.rc1.git0.1....

 ncurses-base
  6.1-10.20180923.fc30
  6.1-11.20190720.fc31

 redhat-rpm-config
  140-1.fc31
  140-2.fc31


https://apps.fedoraproject.org/koschei/package/micropython

I suspect the glibc update.

../../py/objslice.c
LINK mpy-cross
BUILDSTDERR: gcc -o mpy-cross build/py/mpstate.o build/py/nlr.o build/py/nlrx86.o build/py/nlrx64.o build/py/nlrthumb.o build/py/nlrxtensa.o build/py/nlrsetjmp.o build/py/malloc.o build/py/gc.o build/py/pystack.o build/py/qstr.o build/py/vstr.o build/py/mpprint.o build/py/unicode.o build/py/mpz.o build/py/reader.o build/py/lexer.o build/py/parse.o build/py/scope.o build/py/compile.o build/py/emitcommon.o build/py/emitbc.o build/py/asmbase.o build/py/asmx64.o build/py/emitnx64.o build/py/asmx86.o build/py/emitnx86.o build/py/asmthumb.o build/py/emitnthumb.o build/py/emitinlinethumb.o build/py/asmarm.o build/py/emitnarm.o build/py/asmxtensa.o build/py/emitnxtensa.o build/py/emitinlinextensa.o build/py/formatfloat.o build/py/parsenumbase.o build/py/parsenum.o build/py/emitglue.o build/py/persistentcode.o build/py/runtime.o build/py/runtime_utils.o build/py/scheduler.o build/py/nativeglue.o build/py/stackctrl.o build/py/argcheck.o build/py/warning.o build/py/map.o build/py/obj.o build/py/objarray.o build/py/objattrtuple.o build/py/objbool.o build/py/objboundmeth.o build/py/objcell.o build/py/objclosure.o build/py/objcomplex.o build/py/objdeque.o build/py/objdict.o build/py/objenumerate.o build/py/objexcept.o build/py/objfilter.o build/py/objfloat.o build/py/objfun.o build/py/objgenerator.o build/py/objgetitemiter.o build/py/objint.o build/py/objint_longlong.o build/py/objint_mpz.o build/py/objlist.o build/py/objmap.o build/py/objmodule.o build/py/objobject.o build/py/objpolyiter.o build/py/objproperty.o build/py/objnone.o build/py/objnamedtuple.o build/py/objrange.o build/py/objreversed.o build/py/objset.o build/py/objsingleton.o build/py/objslice.o build/py/objstr.o build/py/objstrunicode.o build/py/objstringio.o build/py/objtuple.o build/py/objtype.o build/py/objzip.o build/py/opmethods.o build/py/sequence.o build/py/stream.o build/py/binary.o build/py/builtinimport.o build/py/builtinevex.o build/py/builtinstrip: warning: mpy-cross: corrupt GNU_PROPERTY_TYPE (5) size: 0
BUILDSTDERR: strip:mpy-cross[.gnu.build.attributes]: bad GNU build attribute notes: first note not version note: bad value

Comment 5 Florian Weimer 2019-08-02 15:32:16 UTC
This is a binutils bug.  Short reproducer:

touch t.c
gcc -shared t.c
gcc -shared t.c -Wl,-Map=t.map
readelf -nW a.out

This prints:

Displaying notes found in: .note.gnu.property
  Owner                 Data size	Description
  GNU                  0x00000000	NT_GNU_PROPERTY_TYPE_0	      Properties: <corrupt GNU_PROPERTY_TYPE, size = 0>

The workaround is to drop the -Wl,-Map= argument.

Comment 6 Florian Weimer 2019-08-02 16:51:11 UTC
Unfortunately, this is only the first bug, which I fixed in binutils-2.32-20.fc31 by backporting the upstream patch.

The next problem is that --gc-sections produces an unstrippable object.

Reproducer:

cat > t.c <<EOF
int main (void)
{
}
EOF
gcc -ffunction-sections t.c -Wl,--gc-sections
strip a.out

The reason is that --gc-sections reorders sections, so that the note ordering check in strip breaks.

I think this is a new problem.

Comment 7 Florian Weimer 2019-08-02 16:54:43 UTC
I filed this an upstream bug.  I think this has to wait until Nick returns.  In the meantime, you can remove the -Wl,--gc-sections or the strip as a workaround.

Comment 8 Miro Hrončok 2019-08-02 21:43:02 UTC
Thanks.

Comment 9 Nick Clifton 2019-08-05 16:45:42 UTC
Fixed in binutils-2.32-21.fc31

Comment 10 Miro Hrončok 2019-08-05 22:10:23 UTC
Thank you both, micropython built.

Comment 11 Ben Cotton 2019-08-13 17:12:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 12 Ben Cotton 2019-08-13 18:32:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 13 Ben Cotton 2020-11-03 15:25:56 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Petr Viktorin 2020-11-12 17:10:50 UTC
The update was released a while ago. Thank you!


Note You need to log in before you can comment on or make changes to this bug.