#624208 binutils-gold: internal error in input_sections_begin, at ../../gold/merge.h:269

#624208#5
Date:
2011-04-26 12:34:50 UTC
From:
To:
Was trying to compile libhugetlbfs-2.12 on my 32-bit intel.
(same behaviour with gcc 4.5 and 4.6).

$ make
.....
         CC32 obj32/zero_filesize_segment.o
         LD32 (preload test) obj32/zero_filesize_segment
/usr/bin/ld: error: zero_filesize_segment.ld: SECTIONS seen after other input
files; try -T/--script
/usr/bin/ld: internal error in input_sections_begin, at ../../gold/merge.h:269
collect2: ld returned 1 exit status
....

Thanks.

#624208#10
Date:
2011-04-26 12:51:21 UTC
From:
To:
tag 624208 + moreinfo help
thanks

- verbose build log please
- please attach the object files and libraries used for the link

#624208#15
Date:
2011-04-27 04:04:15 UTC
From:
To:
Sorry for not providing it at first place,
but this is really small project, you can download it
from http://sourceforge.net/projects/libhugetlbfs/files/libhugetlbfs/2.12/libhugetlbfs-2.12.tar.gz
unpack, and just run make. It is just few files.

I attach object files and script which should reproduce error under i386.

Regards,
Witek

#624208#20
Date:
2011-04-27 12:01:25 UTC
From:
To:
please attach any library (.so files and compiler object files), best in one
tarball.  In it's current form, the internal error is not reproducible for me.

#624208#25
Date:
2011-04-27 20:27:03 UTC
From:
To:
There is no .so files used. I copied all files I attached in previous message
into separate directory, removed all references to dynamic libraries,
as well all paths, and it still gives me same error.

You mean -lgcc -lc -lgcc_s ld-linux.so.2 crt1.o crtbegin.o crtn.o and dependencies?

Can you say what error you get?

Can you try the same files but with this simplified command:


gold --build-id --no-add-needed --eh-frame-hdr -m elf_i386 --hash-style=both -dynamic-linker \
  /lib/ld-linux.so.2 -o zero_filesize_segment \
  /usr/lib/crti.o \
  zero_filesize_segment.ld ./zero_filesize_segment.o ./testutils.o \
  ./hugetlbfs_privutils.a

Regards,
Witek

PS. My ld-linux.so.2 and crti.o is from   libc6{-dev} 2.11.2-11