Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 370087 - sys-libs/glibc-2.12.2: MAKEOPTS=-s: ld hits internal error at bfd/elf32-i386.c:2946:elf_i386_relocate_section with binutils-2.20.1-r1 on hardened
Summary: sys-libs/glibc-2.12.2: MAKEOPTS=-s: ld hits internal error at bfd/elf32-i386....
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-05 10:40 UTC by Fabiano Francesconi
Modified: 2015-03-21 20:11 UTC (History)
1 user (show)

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


Attachments
emerge --info (2075004.txt,4.06 KB, text/plain)
2011-06-05 10:40 UTC, Fabiano Francesconi
Details
ebuild.log (2074983.txt,38.49 KB, text/plain)
2011-06-05 10:40 UTC, Fabiano Francesconi
Details
Build log (build.log.tar.bz2,101.79 KB, application/x-bzip2)
2011-06-06 14:58 UTC, Fabiano Francesconi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabiano Francesconi 2011-06-05 10:40:19 UTC
Created attachment 275869 [details]
emerge --info

See attached files
Comment 1 Fabiano Francesconi 2011-06-05 10:40:38 UTC
Created attachment 275871 [details]
ebuild.log
Comment 2 SpanKY gentoo-dev 2011-06-06 00:50:19 UTC
Comment on attachment 275871 [details]
ebuild.log

this log is useless.  never post something built with MAKEFLAGS=-s in your bug reports.  please re-emerge with a proper log and post that as an attachment.
Comment 3 SpanKY gentoo-dev 2011-06-06 00:51:43 UTC
would be useful to see if binutils-2.21 fails as well
Comment 4 Fabiano Francesconi 2011-06-06 09:38:03 UTC
This is weird.. I tried removing "-s" from the MAKEOPTS and now suddently it compiles just fine.

Is it ok? I don't think so.. now I will try to recompile it re-adding the "-s" to the make options and let see what happens..
Comment 5 Fabiano Francesconi 2011-06-06 10:10:13 UTC
Ok, confirmed. Readding '-s' to MAKEOPTS breaks the compiling phase.
Comment 6 Fabiano Francesconi 2011-06-06 14:58:57 UTC
Created attachment 276023 [details]
Build log
Comment 7 Fabiano Francesconi 2011-06-06 15:00:27 UTC
I've switched to i686-pc-linux-gnu-4.4.5 (from i686-pc-linux-gnu-4.4.5-hardenednopie) and I removed the "-s" flag from MAKEOPTS and it crashes again.

See attached build.log (it's a tarball that contains ~8mb plain text file) for more information
Comment 8 SpanKY gentoo-dev 2011-06-07 04:19:36 UTC
and have you tried binutils-2.21 ?
Comment 9 Fabiano Francesconi 2011-06-07 10:46:58 UTC
Same error.

/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/../../../../i686-pc-linux-gnu/bin/ld: BFD (GNU Binutils) 2.21 internal error, aborting at /var/tmp/portage/sys-devel/binutils-2.21/work/binutils-2.21/bfd/elf32-i386.c line 3042 in elf_i386_relocate_section
Comment 10 Francisco Blas Izquierdo Riera gentoo-dev 2011-06-08 21:04:25 UTC
This is the snippet of code:
"	  if ((input_section->flags & SEC_ALLOC) == 0
	      || h->plt.offset == (bfd_vma) -1)
	    abort ();"

And here is a comment from the previous if:
      /* Since STT_GNU_IFUNC symbol must go through PLT, we handle
	 it here if it is defined in a non-shared object.  */

So maybe a non shared object is in that command and shouldn't be? Not sure how to check that though :(
Comment 11 SpanKY gentoo-dev 2015-03-21 20:10:36 UTC
i can't reproduce with recent versions:
  sys-devel/binutils-2.24-r3
  sys-devel/gcc-4.8.3
  sys-libs/glibc-2.20-r2

specifically i tried:
  MAKEOPTS='-j2 -s' emerge glibc
Comment 12 SpanKY gentoo-dev 2015-03-21 20:11:05 UTC
(In reply to SpanKY from comment #11)

and that's on an hardened/linux/amd64/no-multilib system