[Bug ld/5765] New: Misprint in _bfd_elf_section_already_linked
Hi! Consider this code: bfd/elflink.c: . . . void _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section *sec, struct bfd_link_info *info) { . . . switch (flags & SEC_LINK_DUPLICATES) { . . . case SEC_LINK_DUPLICATES_DISCARD: . . . case SEC_LINK_DUPLICATES_ONE_ONLY: . . . case SEC_LINK_DUPLICATES_SAME_SIZE: The expression in switch does not correspond to the definitions in bfd.h: . . . #define SEC_LINK_DUPLICATES 0x4 . . . #define SEC_LINK_DUPLICATES_DISCARD 0x0 . . . #define SEC_LINK_DUPLICATES_ONE_ONLY 0x8 . . . #define SEC_LINK_DUPLICATES_SAME_SIZE 0x10 -- Summary: Misprint in _bfd_elf_section_already_linked Product: binutils Version: 2.19 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: ilmalakhov at yandex dot ru CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=5765 --- 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 binutils/5713] strings: use '-0' as option will meet infinite loop
--- Additional Comments From chul at cn dot fujitsu dot com 2008-02-15 09:41 --- Hi, I have tried it out. It' Ok now. And I found if the "num" is the hex number in "-n num" option , the result is a little strange and 0xA can't be recognized. So I made a patch for it. Hope it is useful. Regards Chuli -- http://sourceware.org/bugzilla/show_bug.cgi?id=5713 --- 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 binutils/5713] strings: use '-0' as option will meet infinite loop
--- Additional Comments From chul at cn dot fujitsu dot com 2008-02-15 09:44 --- Created an attachment (id=2268) --> (http://sourceware.org/bugzilla/attachment.cgi?id=2268&action=view) Used for "-n num" when num is hexadecimal or octal -- http://sourceware.org/bugzilla/show_bug.cgi?id=5713 --- 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/5765] Misprint in _bfd_elf_section_already_linked
--- Additional Comments From amodra at bigpond dot net dot au 2008-02-15 10:13 --- Indeed. Nicely spotted. It's been that way since 2005-02-21 -- What|Removed |Added Status|NEW |ASSIGNED Last reconfirmed|-00-00 00:00:00 |2008-02-15 10:13:06 date|| http://sourceware.org/bugzilla/show_bug.cgi?id=5765 --- 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 binutils/5713] strings: use '-0' as option will meet infinite loop
--- Additional Comments From nickc at redhat dot com 2008-02-15 10:23 --- Created an attachment (id=2269) --> (http://sourceware.org/bugzilla/attachment.cgi?id=2269&action=view) Revised patch which removes integer_arg() -- What|Removed |Added Attachment #2227 is|0 |1 obsolete|| Attachment #2262 is|0 |1 obsolete|| Attachment #2268 is|0 |1 obsolete|| http://sourceware.org/bugzilla/show_bug.cgi?id=5713 --- 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 binutils/5713] strings: use '-0' as option will meet infinite loop
--- Additional Comments From nickc at redhat dot com 2008-02-15 10:25 --- Hi Chu, Thanks for pointing that out. In fact the integer_arg() function is completely redundant as the C library function strtoul() does everything that is needed. So I have applied a revised version of the patch which removes the function entirely. I hope that this resolves the issue for you. Cheers Nick binutils/ChangeLog 2008-02-15 Chu Li <[EMAIL PROTECTED]> Nick Clifton <[EMAIL PROTECTED]> PR binutils/5713 * strings.c (integer_arg): Delete function. (string_min): Initialise to 4. (main): Use strtoul to parse integer arguments. Move check for an invalid string length to after all the arguments have been parsed. (usage): Use indentation to indicate that - is a another form of the --bytes= command line option. -- What|Removed |Added Status|WAITING |RESOLVED Resolution||FIXED http://sourceware.org/bugzilla/show_bug.cgi?id=5713 --- 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/5765] Misprint in _bfd_elf_section_already_linked
--- Additional Comments From amodra at bigpond dot net dot au 2008-02-15 10:39 --- http://sourceware.org/ml/binutils-cvs/2008-02/msg00085.html http://sourceware.org/ml/binutils/2008-02/msg00155.html -- What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://sourceware.org/bugzilla/show_bug.cgi?id=5765 --- 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/5761] Segfault in make_abs().
--- Additional Comments From osv at javad dot com 2008-02-15 12:01 --- Fortunately the problem has nothing to do with object files. It's the linker command file that does matter, so here is a simple way to reproduce the segfault: $ cat linker.cmd MEMORY { RAM : ORIGIN = 0, LENGTH = 0x1 ROM : ORIGIN = 0x1, LENGTH = 0x1 } SECTIONS { .data : AT(__data_image) { *(.data*) } > RAM __rom_data_start = LOADADDR(.data); .data_image (NOLOAD): { __data_image = .; . += SIZEOF(.data); } > RAM } $ echo -n "" | ~/try/bin/sparc-elf-as -o test.o && \ > ~/try/bin/sparc-elf-ld -v -T linker.cmd test.o GNU ld (GNU Binutils) 2.18.50.20080213 Segmentation fault (core dumped) $ -- http://sourceware.org/bugzilla/show_bug.cgi?id=5761 --- 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/5761] Segfault in make_abs().
-- What|Removed |Added Status|NEW |ASSIGNED Last reconfirmed|-00-00 00:00:00 |2008-02-16 00:06:46 date|| http://sourceware.org/bugzilla/show_bug.cgi?id=5761 --- 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/5761] Segfault in make_abs().
-- What|Removed |Added AssignedTo|unassigned at sources dot |amodra at bigpond dot net |redhat dot com |dot au Status|ASSIGNED|NEW http://sourceware.org/bugzilla/show_bug.cgi?id=5761 --- 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/5761] Segfault in make_abs().
--- Additional Comments From amodra at bigpond dot net dot au 2008-02-16 00:08 --- http://sourceware.org/ml/binutils/2008-02/msg00158.html -- What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://sourceware.org/bugzilla/show_bug.cgi?id=5761 --- 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