[Bug binutils/11582] BFD structure linkage is broken
--- Additional Comments From dzidzitop at lavabit dot com 2010-05-10 10:21 --- Where is that "silly error"? -- What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | http://sourceware.org/bugzilla/show_bug.cgi?id=11582 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
Warning build bfd library wiht gcc 4.6.0+fix
At least with my configuration gcc 4.6.0 complains about the initialisation but non-use of hasdebug in coff_write_object_contents (defined in bfd/coffcode.h). Since -Werror is in effect this stops the build. The attached oatch fixes this problem by adding hasdebug=hasdebug; if the only use of hasdebug fails to appear due to the preprocessor switches in effect. IMHO a function of this size needs a very good excuse to hide in a *.h file instead of a *.c file but that might just be my coding style. Duncan (-: --- bfd/coffcode.h.dist 2010-05-09 15:09:25.940003506 +0100 +++ bfd/coffcode.h 2010-05-10 09:39:11.680021412 +0100 @@ -3957,6 +3957,8 @@ internal_f.f_flags |= IMAGE_FILE_DEBUG_STRIPPED; if (pe_data (abfd)->real_flags & IMAGE_FILE_LARGE_ADDRESS_AWARE) internal_f.f_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE; +#else + hasdebug=hasdebug; /* Stop compiler warning */ #endif #ifndef COFF_WITH_pex64 ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11583] New: ld aborts in elf_link_output_extsym when given EXTERN() symbol in script.
Hello all, I was trying to define aliases for some functions in an ld script and ld aborts in the above function. The command line and output is: $ ld -o dparse dparse_objs.lds -lc /usr/lib/libc.so:6: unresolvable symbol `puts' referenced in expression /usr/lib/libc.so:6: unresolvable symbol `puts' referenced in expression ld: warning: cannot find entry symbol _start; defaulting to 0804817c /home/sukru/dparse/src/../obj/_func_main_1.o: In function `_llf_func_main_1': _func_main_1.c:(.text+0x9d): undefined reference to `_xlfputs' ld: BFD (GNU Binutils for Ubuntu) 2.18.93.20081009 internal error, aborting at ../../bfd/elflink.c line 8573 in elf_link_output_extsym ld: Please report this bug. The version of ld is: $ ld -v GNU ld (GNU Binutils for Ubuntu) 2.18.93.20081009 My host: $ uname -a Linux sukru-laptop 2.6.27-17-generic #1 SMP Fri Mar 12 03:09:00 UTC 2010 i686 GNU/Linux I'm running Ubuntu 8.10. Here is the contents of the linker script: EXTERN(_llf_func_main_1); EXTERN(puts); _func_main_1 = _llf_func_main_1; _xlfputs = puts; cx_main = _llf_func_main_1; INPUT(_func_main_1.o); This only occurs if I link with the shared library libc.so. It doesn't happen when I link with the static library. In the script, _llf_func_main_1 is defined in the _func_main_1.o file. I have tried putting INPUT(-lc); before the EXTERN commands to no avail. I also tried to do the same thing using command line options -u and --defsym, but the same thing happens. -- Summary: ld aborts in elf_link_output_extsym when given EXTERN() symbol in script. Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: cinarus at yahoo dot com CC: bug-binutils at gnu dot org GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://sourceware.org/bugzilla/show_bug.cgi?id=11583 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11583] ld aborts in elf_link_output_extsym when given EXTERN() symbol in script.
--- Additional Comments From cinarus at yahoo dot com 2010-05-10 15:01 --- Created an attachment (id=4776) --> (http://sourceware.org/bugzilla/attachment.cgi?id=4776&action=view) Test case -- http://sourceware.org/bugzilla/show_bug.cgi?id=11583 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11584] New: ld gives internal error
Got an internal error when linking Qt in ubuntu 10.04: /usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.20.1-system.20100303 internal error, aborting at ../../bfd/merge.c line 876 in _bfd_merged_section_offset That happened just once, I cannot reproduce it anymore so don't have any additional details. Hope that helps. -- Summary: ld gives internal error Product: binutils Version: 2.20 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: denis dot dzyubenko at nokia dot com CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=11584 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
Re: Warning build bfd library with gcc 4.6.0+fix
On Mon, May 10, 2010 at 10:01:21AM +0100, Duncan Simpson wrote: > At least with my configuration gcc 4.6.0 complains about the initialisation > but non-use of hasdebug in coff_write_object_contents (defined in > bfd/coffcode.h). Since -Werror is in effect this stops the build. Applied. * coffcode.h (coff_write_object_contents): Enclose all occurrences of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE. Index: bfd/coffcode.h === RCS file: /cvs/src/src/bfd/coffcode.h,v retrieving revision 1.164 diff -u -p -r1.164 coffcode.h --- bfd/coffcode.h 27 Apr 2010 17:26:03 - 1.164 +++ bfd/coffcode.h 11 May 2010 04:33:05 - @@ -3533,7 +3533,9 @@ coff_write_object_contents (bfd * abfd) asection *current; bfd_boolean hasrelocs = FALSE; bfd_boolean haslinno = FALSE; +#ifdef COFF_IMAGE_WITH_PE bfd_boolean hasdebug = FALSE; +#endif file_ptr scn_base; file_ptr reloc_base; file_ptr lineno_base; @@ -3636,9 +3638,9 @@ coff_write_object_contents (bfd * abfd) current = current->next) { struct internal_scnhdr section; +#ifdef COFF_IMAGE_WITH_PE bfd_boolean is_reloc_section = FALSE; -#ifdef COFF_IMAGE_WITH_PE if (strcmp (current->name, DOT_RELOC) == 0) { is_reloc_section = TRUE; @@ -3737,9 +3739,11 @@ coff_write_object_contents (bfd * abfd) #endif if (current->lineno_count != 0) haslinno = TRUE; +#ifdef COFF_IMAGE_WITH_PE if ((current->flags & SEC_DEBUGGING) != 0 && ! is_reloc_section) hasdebug = TRUE; +#endif #ifdef RS6000COFF_C #ifndef XCOFF64 -- Alan Modra Australia Development Lab, IBM ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils