[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: binutils gold linker



On Tue, 2015-08-18 at 17:20 +0200, Artyom Tarasenko wrote:
> Hi Knut Petter,
> 
> Can you please do the following:
>   git clone git://sourceware.org/git/binutils-gdb.git
>   mkdir binutils-build && cd binutils-build
>   ../binutils-gdb/configure && make -j8
>   mkdir gold && cd gold
>   ../../binutils-gdb/gold/configure && make check-TESTS
> 
> And post here the test report generated? Should be something like
> make[1]: Entering directory `/projects/binutils-build/gold'
> PASS: bootstrap-test
> gcctestdir2-r/ld -o libgold-2-r.o -r --whole-archive libgold.a
> <...>

Build binutils with your script. But make check-TESTS or make check
exits with (a config) error? Attaching gold-make-check.log [plain txt]

g++ -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-fmerge-constants -g -O2 -Bgcctestdir/  -o large_symbol_alignment
large_symbol_alignment.o  -ldl 

gcctestdir/ld: -plugin: unknown option
gcctestdir/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
Makefile:3513: recipe for target 'large_symbol_alignment' failed

Good to know (sparc64) git is old, and not installable.

Thanks,


Frans van Berckel
root@deblnxsrv230:/usr/src/binutils/binutils-build/gold# make check
Making check in po
make[1]: Entering directory '/usr/src/binutils/binutils-build/gold/po'
file=`echo es | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../binutils-gdb/gold/po/es.po
file=`echo fi | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../binutils-gdb/gold/po/fi.po
file=`echo fr | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../binutils-gdb/gold/po/fr.po
file=`echo id | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../binutils-gdb/gold/po/id.po
file=`echo it | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../binutils-gdb/gold/po/it.po
file=`echo vi | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ../../../binutils-gdb/gold/po/vi.po
make[1]: Leaving directory '/usr/src/binutils/binutils-build/gold/po'
Making check in testsuite
make[1]: Entering directory '/usr/src/binutils/binutils-build/gold/testsuite'
(for i in `seq 1 70000`; do \
   echo "int var_$i __attribute__((section(\"section_$i\"))) = $i;"; \
 done) > many_sections_define.h.tmp
mv -f many_sections_define.h.tmp many_sections_define.h
(for i in `seq 1 1000 70000`; do \
   echo "assert(var_$i == $i);"; \
 done) > many_sections_check.h.tmp
mv -f many_sections_check.h.tmp many_sections_check.h
make  check-am
make[2]: Entering directory '/usr/src/binutils/binutils-build/gold/testsuite'
make  libgoldtest.a object_unittest binary_unittest leb128_unittest icf_virtual_function_folding_test large_symbol_alignment basic_test basic_pic_test eh_test basic_static_test basic_static_pic_test basic_pie_test constructor_test constructor_static_test two_file_test two_file_pic_test two_file_static_test two_file_shared_1_test two_file_shared_2_test two_file_shared_1_pic_2_test two_file_shared_2_pic_1_test two_file_same_shared_test two_file_separate_shared_12_test two_file_separate_shared_21_test two_file_relocatable_test two_file_pie_test pie_copyrelocs_test weak_unresolved_symbols_test  two_file_strip_test two_file_same_shared_strip_test common_test_1 common_test_2 exception_test exception_shared_1_test exception_shared_2_test exception_same_shared_test exception_separate_shared_12_test exception_separate_shared_21_test exception_static_test weak_test weak_undef_test weak_undef_test_2  weak_alias_test weak_plt copy_test tls_test tls_pic_test tls_pie_test tls_pie_pic_test tls_shared_test tls_shared_ie_test tls_shared_gd_to_ie_test   tls_static_test tls_static_pic_test  many_sections_test many_sections_r_test initpri1 initpri2 initpri3a flagstest_o_specialfile flagstest_compress_debug_sections_none flagstest_compress_debug_sections flagstest_compress_debug_sections_and_build_id_tree flagstest_compress_debug_sections_gnu flagstest_compress_debug_sections_gabi flagstest_o_specialfile_and_compress_debug_sections flagstest_o_ttext_1 ver_test ver_test_2 ver_test_6 ver_test_8 ver_test_9 ver_test_11 ver_test_12 protected_1 protected_2 relro_test relro_now_test relro_strip_test relro_script_test script_test_1 script_test_2 justsyms justsyms_exec binary_test script_test_3 tls_phdrs_script_test tls_script_test script_test_11 script_test_12 script_test_12i dynamic_list_2 thin_archive_test_1 thin_archive_test_2   exclude_libs_test local_labels_test discard_locals_test  permission_test searched_file_test ifuncmain1static ifuncmain1picstatic ifuncmain1 ifuncmain1pic ifuncmain1vis ifuncmain1vispic ifuncmain1staticpic ifuncmain1pie ifuncmain1vispie ifuncmain1staticpie ifuncmain2static ifuncmain2picstatic ifuncmain2 ifuncmain2pic ifuncmain3 ifuncmain4static ifuncmain4picstatic ifuncmain4 ifuncmain5static ifuncmain5picstatic ifuncmain5 ifuncmain5pic ifuncmain5staticpic ifuncmain5pie ifuncmain6pie ifuncmain7static ifuncmain7picstatic ifuncmain7 ifuncmain7pic ifuncmain7pie ifuncvar start_lib_test ehdr_start_test_1 ehdr_start_test_2 ehdr_start_test_3 ehdr_start_test_5  \
  incremental_test.sh gc_comdat_test.sh gc_tls_test.sh gc_orphan_section_test.sh pr14265.sh gc_dynamic_list_test.sh icf_test.sh icf_keep_unique_test.sh icf_safe_test.sh icf_safe_so_test.sh final_layout.sh text_section_grouping.sh section_sorting_name.sh icf_preemptible_functions_test.sh icf_string_merge_test.sh icf_sht_rel_addend_test.sh merge_string_literals.sh two_file_shared.sh weak_plt.sh tls_pie_test.sh   debug_msg.sh missing_key_func.sh undef_symbol.sh pr18689.sh ver_test_1.sh ver_test_2.sh ver_test_4.sh ver_test_5.sh ver_test_7.sh ver_test_10.sh relro_test.sh ver_matching_test.sh script_test_3.sh script_test_4.sh script_test_5.sh script_test_6.sh script_test_7.sh script_test_8.sh script_test_9.sh dynamic_list.sh    exclude_libs_test.sh discard_locals_test.sh hidden_test.sh retain_symbols_file_test.sh no_version_test.sh strong_ref_weak_def.sh dyn_weak_ref.sh memory_test.sh gdb_index_test_1.sh gdb_index_test_2.sh gdb_index_test_2_gabi.sh gdb_index_test_3.sh gdb_index_test_4.sh ehdr_start_test_4.sh defsym_test.sh script_test_10.sh      incremental_test.stdout gc_comdat_test.stdout gc_tls_test.stdout gc_orphan_section_test.stdout pr14265.stdout gc_dynamic_list_test.stdout icf_test.map icf_keep_unique_test.stdout icf_safe_test_1.stdout icf_safe_test_2.stdout icf_safe_test.map icf_safe_so_test_1.stdout icf_safe_so_test_2.stdout icf_safe_so_test.map final_layout.stdout text_section_grouping.stdout text_section_no_grouping.stdout section_sorting_name.stdout icf_preemptible_functions_test.stdout icf_string_merge_test.stdout icf_sht_rel_addend_test.stdout merge_string_literals.stdout two_file_shared.dbg weak_plt_shared.so tls_pie_test.stdout   debug_msg.err missing_key_func.err debug_msg_cdebug.err debug_msg_cdebug_gabi.err debug_msg_so.err debug_msg_ndebug.err undef_symbol.err flagstest_compress_debug_sections_none.stdout flagstest_compress_debug_sections.stdout flagstest_compress_debug_sections.cmp flagstest_compress_debug_sections.check flagstest_compress_debug_sections_gnu.stdout flagstest_compress_debug_sections_gnu.cmp flagstest_compress_debug_sections_gnu.check flagstest_compress_debug_sections_gabi.stdout flagstest_compress_debug_sections_gabi.cmp flagstest_compress_debug_sections_gabi.check pr18689.stdout flagstest_o_ttext_2 ver_test_1.syms ver_test_2.syms ver_test_4.syms ver_test_5.syms ver_test_7.syms ver_test_10.syms protected_3.err relro_test.stdout ver_matching_test.stdout script_test_3.stdout script_test_4.stdout script_test_5.stdout script_test_6.stdout script_test_7.stdout script_test_8.stdout script_test_9.stdout dynamic_list.stdout    exclude_libs_test.syms discard_locals_test.syms discard_locals_relocatable_test1.syms discard_locals_relocatable_test2.syms hidden_test.err retain_symbols_file_test.stdout no_version_test.stdout strong_ref_weak_def.stdout dyn_weak_ref.stdout memory_test.stdout memory_test_2 gdb_index_test_1.stdout gdb_index_test_2.stdout gdb_index_test_2_gabi.stdout gdb_index_test_3.stdout gdb_index_test_4.stdout ehdr_start_test_4.syms defsym_test.syms script_test_10.stdout     
make[3]: Entering directory '/usr/src/binutils/binutils-build/gold/testsuite'
`echo g++ -DHAVE_CONFIG_H -I. -I../../../binutils-gdb/gold/testsuite -I..  -I../../../binutils-gdb/gold/testsuite -I../../../binutils-gdb/gold/testsuite/.. -I../../../binutils-gdb/gold/testsuite/../../include -I../../../binutils-gdb/gold/testsuite/../../elfcpp -I.. -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -MT test.o -MD -MP -MF .deps/test.Tpo -c -o test.o ../../../binutils-gdb/gold/testsuite/test.cc
mv -f .deps/test.Tpo .deps/test.Po
`echo g++ -DHAVE_CONFIG_H -I. -I../../../binutils-gdb/gold/testsuite -I..  -I../../../binutils-gdb/gold/testsuite -I../../../binutils-gdb/gold/testsuite/.. -I../../../binutils-gdb/gold/testsuite/../../include -I../../../binutils-gdb/gold/testsuite/../../elfcpp -I.. -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -MT testmain.o -MD -MP -MF .deps/testmain.Tpo -c -o testmain.o ../../../binutils-gdb/gold/testsuite/testmain.cc
mv -f .deps/testmain.Tpo .deps/testmain.Po
`echo g++ -DHAVE_CONFIG_H -I. -I../../../binutils-gdb/gold/testsuite -I..  -I../../../binutils-gdb/gold/testsuite -I../../../binutils-gdb/gold/testsuite/.. -I../../../binutils-gdb/gold/testsuite/../../include -I../../../binutils-gdb/gold/testsuite/../../elfcpp -I.. -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -MT testfile.o -MD -MP -MF .deps/testfile.Tpo -c -o testfile.o ../../../binutils-gdb/gold/testsuite/testfile.cc
mv -f .deps/testfile.Tpo .deps/testfile.Po
rm -f libgoldtest.a
ar cru libgoldtest.a test.o testmain.o testfile.o 
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libgoldtest.a
`echo g++ -DHAVE_CONFIG_H -I. -I../../../binutils-gdb/gold/testsuite -I..  -I../../../binutils-gdb/gold/testsuite -I../../../binutils-gdb/gold/testsuite/.. -I../../../binutils-gdb/gold/testsuite/../../include -I../../../binutils-gdb/gold/testsuite/../../elfcpp -I.. -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -MT object_unittest.o -MD -MP -MF .deps/object_unittest.Tpo -c -o object_unittest.o ../../../binutils-gdb/gold/testsuite/object_unittest.cc
mv -f .deps/object_unittest.Tpo .deps/object_unittest.Po
`echo g++ -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -fno-use-linker-plugin   -o object_unittest | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` object_unittest.o libgoldtest.a ../libgold.a ../../libiberty/libiberty.a    -L../../zlib -lz -ldl 
`echo g++ -DHAVE_CONFIG_H -I. -I../../../binutils-gdb/gold/testsuite -I..  -I../../../binutils-gdb/gold/testsuite -I../../../binutils-gdb/gold/testsuite/.. -I../../../binutils-gdb/gold/testsuite/../../include -I../../../binutils-gdb/gold/testsuite/../../elfcpp -I.. -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -MT binary_unittest.o -MD -MP -MF .deps/binary_unittest.Tpo -c -o binary_unittest.o ../../../binutils-gdb/gold/testsuite/binary_unittest.cc
mv -f .deps/binary_unittest.Tpo .deps/binary_unittest.Po
`echo g++ -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -fno-use-linker-plugin   -o binary_unittest | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` binary_unittest.o libgoldtest.a ../libgold.a ../../libiberty/libiberty.a    -L../../zlib -lz -ldl 
`echo g++ -DHAVE_CONFIG_H -I. -I../../../binutils-gdb/gold/testsuite -I..  -I../../../binutils-gdb/gold/testsuite -I../../../binutils-gdb/gold/testsuite/.. -I../../../binutils-gdb/gold/testsuite/../../include -I../../../binutils-gdb/gold/testsuite/../../elfcpp -I.. -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -MT leb128_unittest.o -MD -MP -MF .deps/leb128_unittest.Tpo -c -o leb128_unittest.o ../../../binutils-gdb/gold/testsuite/leb128_unittest.cc
mv -f .deps/leb128_unittest.Tpo .deps/leb128_unittest.Po
`echo g++ -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -fno-use-linker-plugin   -o leb128_unittest | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` leb128_unittest.o libgoldtest.a ../libgold.a ../../libiberty/libiberty.a    -L../../zlib -lz -ldl 
`echo g++ -DHAVE_CONFIG_H -I. -I../../../binutils-gdb/gold/testsuite -I..  -I../../../binutils-gdb/gold/testsuite -I../../../binutils-gdb/gold/testsuite/.. -I../../../binutils-gdb/gold/testsuite/../../include -I../../../binutils-gdb/gold/testsuite/../../elfcpp -I.. -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -O0 -c -ffunction-sections -fPIE -g -o icf_virtual_function_folding_test.o ../../../binutils-gdb/gold/testsuite/icf_virtual_function_folding_test.cc
test -d gcctestdir || mkdir -p gcctestdir
rm -f gcctestdir/ld
(cd gcctestdir && ln -s ../../ld-new ld)
`echo g++ -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -fno-use-linker-plugin   -o icf_virtual_function_folding_test | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -Bgcctestdir/ -Wl,--icf=all icf_virtual_function_folding_test.o -pie
`echo g++ -DHAVE_CONFIG_H -I. -I../../../binutils-gdb/gold/testsuite -I..  -I../../../binutils-gdb/gold/testsuite -I../../../binutils-gdb/gold/testsuite/.. -I../../../binutils-gdb/gold/testsuite/../../include -I../../../binutils-gdb/gold/testsuite/../../elfcpp -I.. -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -MT large_symbol_alignment.o -MD -MP -MF .deps/large_symbol_alignment.Tpo -c -o large_symbol_alignment.o ../../../binutils-gdb/gold/testsuite/large_symbol_alignment.cc
mv -f .deps/large_symbol_alignment.Tpo .deps/large_symbol_alignment.Po
g++ -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -Bgcctestdir/  -o large_symbol_alignment large_symbol_alignment.o  -ldl 
gcctestdir/ld: -plugin: unknown option
gcctestdir/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
Makefile:3513: recipe for target 'large_symbol_alignment' failed
make[3]: *** [large_symbol_alignment] Error 1
make[3]: Leaving directory '/usr/src/binutils/binutils-build/gold/testsuite'
Makefile:4884: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
make[2]: Leaving directory '/usr/src/binutils/binutils-build/gold/testsuite'
Makefile:4888: recipe for target 'check' failed
make[1]: *** [check] Error 2
make[1]: Leaving directory '/usr/src/binutils/binutils-build/gold/testsuite'
Makefile:874: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

Reply to: