[Bug ld/17288] New: sh64 incremental link does not set flags in ELF header
https://sourceware.org/bugzilla/show_bug.cgi?id=17288 Bug ID: 17288 Summary: sh64 incremental link does not set flags in ELF header Product: binutils Version: 2.24 Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: dhowells at redhat dot com Doing an incremental link with an sh64 binutils does not set the flags field in the ELF header. Using this script: #!/bin/sh -x CROSS=sh64-linux-gnu- LDFLAGS="-EL -mshlelf64" CFLAGS=-m5-64media-nofpu rm -f hello.o wibble.o foo.o bar.o echo 'int hello(int i) {return i + 42;}' | ${CROSS}gcc $CFLAGS -x c -c - -o hello.o || exit $? ${CROSS}readelf -h hello.o | grep Flags ${CROSS}ar rcsD wibble.o hello.o || exit $? ${CROSS}ld $LDFLAGS -r -o foo.o wibble.o || exit $? ${CROSS}readelf -h foo.o | grep Flags ${CROSS}ld $LDFLAGS -r -o bar.o foo.o || exit $? ${CROSS}readelf -h bar.o | grep Flags The following is seen: + CROSS=sh64-linux-gnu- + LDFLAGS='-EL -mshlelf64' + CFLAGS=-m5-64media-nofpu + rm -f hello.o wibble.o foo.o bar.o + echo 'int hello(int i) {return i + 42;}' + sh64-linux-gnu-gcc -m5-64media-nofpu -x c -c - -o hello.o + sh64-linux-gnu-readelf -h hello.o + grep Flags Flags: 0xa, sh5 + sh64-linux-gnu-ar rcsD wibble.o hello.o + sh64-linux-gnu-ld -EL -mshlelf64 -r -o foo.o wibble.o + sh64-linux-gnu-readelf -h foo.o + grep Flags Flags: 0x0 + sh64-linux-gnu-ld -EL -mshlelf64 -r -o bar.o foo.o sh64-linux-gnu-ld: unknown architecture of input file `foo.o' is incompatible with sh5 output + exit 1 As can be seen, the assembler's output is flagged 0xa (sh5), but the linker's output is flagged 0x0. Note that adding -belf64-sh64l to the ld command line doesn't help. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/17288] sh64 incremental link does not set flags in ELF header
https://sourceware.org/bugzilla/show_bug.cgi?id=17288 --- Comment #1 from David Howells --- The binutils was built from the 2.24 tarball plus a patch bringing it up to git release cab6c3ee9785f072a373afe31253df0451db93cf. Build configuration: + LDFLAGS='-Wl,-z,relro ' + ../binutils-2.24/configure \ --disable-dependency-tracking \ --disable-silent-rules \ --enable-checking \ --build=x86_64-redhat-linux-gnu \ --host=x86_64-redhat-linux-gnu \ --target=sh64-linux-elf \ --program-prefix=sh64-linux-gnu- \ --disable-shared \ --disable-install_libbfd \ --with-sysroot=/usr/sh64-linux-gnu/sys-root \ --enable-64-bit-bfd (I've removed the flags that set the various installation paths and the bug url) -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/17287] DT_NEEDED of unneeded libraries affects --as-needed
https://sourceware.org/bugzilla/show_bug.cgi?id=17287 --- Comment #1 from cvs-commit at gcc dot gnu.org --- This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via 1240be6b7d0a5604c4e3efe12c9e1d08ebc246be (commit) from 759388538d1339f6a634b2777e24f46427dd9c96 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1240be6b7d0a5604c4e3efe12c9e1d08ebc246be commit 1240be6b7d0a5604c4e3efe12c9e1d08ebc246be Author: Alan Modra Date: Mon Aug 18 14:43:03 2014 +0930 PR 17287, DT_NEEDED of unneeded libraries affects --as-needed PR 17287 bfd/ * elflink.c (on_needed_list): Only consider libraries that have been loaded. ld/ * ld.texinfo (--as-needed): Clarify that references from libraries must be from needed libraries. ld/testsuite/ * ld-plugin/needed3.c: New file. * ld-elf/shared.exp: Add needed3 test. --- Summary of changes: bfd/ChangeLog |6 ++ bfd/elflink.c |3 ++- ld/ChangeLog |5 + ld/ld.texinfo |4 ++-- ld/testsuite/ChangeLog |5 + .../{ld-elfweak/size_main.c => ld-elf/needed3.c} |2 +- ld/testsuite/ld-elf/shared.exp | 12 7 files changed, 33 insertions(+), 4 deletions(-) copy ld/testsuite/{ld-elfweak/size_main.c => ld-elf/needed3.c} (61%) -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/17287] DT_NEEDED of unneeded libraries affects --as-needed
https://sourceware.org/bugzilla/show_bug.cgi?id=17287 Alan Modra changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #2 from Alan Modra --- Fixed -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/17288] sh64 incremental link does not set flags in ELF header
https://sourceware.org/bugzilla/show_bug.cgi?id=17288 Kaz Kojima changed: What|Removed |Added CC||kkojima at rr dot iij4u.or.jp --- Comment #2 from Kaz Kojima --- > As can be seen, the assembler's output is flagged 0xa (sh5), but the linker's > > output is flagged 0x0. Note that adding -belf64-sh64l to the ld command > line > doesn't help. Does sh64-linux-gnu-ld -EL -mshlelf64 -r -o foo.o --whole-archive wibble.o help? -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/16869] internal error in make_view, at fileread.cc:462
https://sourceware.org/bugzilla/show_bug.cgi?id=16869 Mike Frysinger changed: What|Removed |Added CC||vapier at gentoo dot org --- Comment #3 from Mike Frysinger --- FAILED: x86_64-pc-linux-gnu-g++ -Wl,-O2 -Wl,--as-needed -Wl,-z,now -Wl,-z,relro -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -Wl,--disable-new-dtags -Wl,-O1 -Wl,--gc-sections -o protoc -Wl,--start-group obj.host/third_party/protobuf/src/google/protobuf/compiler/protoc.code_generator.o obj.host/third_party/protobuf/src/google/protobuf/compiler/protoc.command_line_interface.o obj.host/third_party/protobuf/src/google/protobuf/compiler/protoc.plugin.o obj.host/third_party/protobuf/src/google/protobuf/compiler/protoc.plugin.pb.o obj.host/third_party/protobuf/src/google/protobuf/compiler/protoc.subprocess.o obj.host/third_party/protobuf/src/google/protobuf/compiler/protoc.zip_writer.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_enum.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_enum_field.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_extension.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_field.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_file.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_generator.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_helpers.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_message.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_message_field.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_primitive_field.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_service.o obj.host/third_party/protobuf/src/google/protobuf/compiler/cpp/protoc.cpp_string_field.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_enum.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_enum_field.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_extension.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_field.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_file.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_generator.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_helpers.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_message.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_message_field.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_primitive_field.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_service.o obj.host/third_party/protobuf/src/google/protobuf/compiler/java/protoc.java_string_field.o obj.host/third_party/protobuf/src/google/protobuf/compiler/python/protoc.python_generator.o obj.host/third_party/protobuf/src/google/protobuf/compiler/protoc.main.o obj.host/third_party/protobuf/libprotobuf_full_do_not_use.a -Wl,--end-group /usr/x86_64-pc-linux-gnu/binutils-bin/2.24/ld.gold.real: internal error in make_view, at /var/tmp/portage/sys-devel/binutils-2.24-r28/work/binutils-2.24/gold/fileread.cc:473 collect2: error: ld returned 1 exit status that version of binutils corresponds to: https://chromium.googlesource.com/chromiumos/third_party/binutils/+/05f165c16923b2850830938ef17d46f488a22631 -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils