[Bug gas/3041] Bogus jump to weak symbol on m68k-unknown-netbsd
--- Additional Comments From vincent dot riviere at freesbee dot fr 2007-04-28 21:38 --- Created an attachment (id=1739) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1739&action=view) Write correct values and relocs into a.out object files After spending *weeks* in the debugger, I finally managed to get it work. My patch is attached to this message. It is is composed of 4 parts : 1) The patch provided by Nick in Comment #5. It is necessary to generate a reloc with the correct symbol name. 2) Never relax references to weak symbols, as they must be full absolute pointers in order to be relocated. 3) In md_apply_fix(): Always put zero values into frags referencing a weak symbol. 4) In tc_gen_reloc(): Adjust addend in order to force bfd_install_relocation() to put a zero value into the frags referencing a weak symbol. This patch affects only a.out and m68k, and only when weak symbols are used. It may not affect anything else. I think it works as expected. Could someone verify it is OK and check this in, please ? Vincent Here are the detailed results : $ cat bug.s jmp mylabel nop .weak mylabel mylabel: nop $ as bug.s -o bug.o $ objdump -d bug.o bug.o: file format a.out-m68k-netbsd Disassembly of section .text: : 0: 4ef9 jmp 0 6: 4e71nop 0008 : 8: 4e71nop ... $ objdump -r bug.o bug.o: file format a.out-m68k-netbsd RELOCATION RECORDS FOR [.text]: OFFSET TYPE VALUE 0002 32mylabel $ nm bug.o 0008 W mylabel $ ld bug.o -o bug $ objdump -d bug bug: file format a.out-m68k-netbsd Disassembly of section .text: 2020 : 2020: 4ef9 2028 jmp 2028 2026: 4e71nop 2028 : 2028: 4e71nop ... 202c <__etext>: ... -- What|Removed |Added Attachment #1292 is|0 |1 obsolete|| http://sourceware.org/bugzilla/show_bug.cgi?id=3041 --- 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 gas/4436] New: [regression] operand out of range (0x00000000f0000000 is not between 0x0000000000000000 and 0x00000000000000ff)
seen while building current gcc-4_1-branch with binutils 20070426: cc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../src/libiberty/../include -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -fPIC ../../src/libiberty/cplus-dem.c -o pic/cplus-dem.o /tmp/ccUXT6O0.s: Assembler messages: /tmp/ccUXT6O0.s:4067: Error: operand out of range (0xf000 is not between 0x and 0x00ff) make: *** [cplus-dem.o] Error 1 as -a32 -K PIC -mppc -many -V -Qy -o pic/cplus-dem.o cplus-dem.s GNU assembler version 2.17.50 (powerpc-linux-gnu) using BFD version (GNU Binutils for Debian) 2.17.50.20070426 cplus-dem.s: Assembler messages: cplus-dem.s:4067: Error: operand out of range (0xf000 is not between 0x and 0x00ff) -- Summary: [regression] operand out of range (0xf000 is not between 0x and 0x00ff) Product: binutils Version: 2.18 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gas AssignedTo: unassigned at sources dot redhat dot com ReportedBy: doko at debian dot org CC: bug-binutils at gnu dot org GCC target triplet: powerpc-linux-gnu http://sourceware.org/bugzilla/show_bug.cgi?id=4436 --- 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 gas/4436] [regression] operand out of range (0x00000000f0000000 is not between 0x0000000000000000 and 0x00000000000000ff)
--- Additional Comments From doko at debian dot org 2007-04-29 07:09 --- Created an attachment (id=1740) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1740&action=view) preprocessed source -- http://sourceware.org/bugzilla/show_bug.cgi?id=4436 --- 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 gas/4436] [regression] operand out of range (0x00000000f0000000 is not between 0x0000000000000000 and 0x00000000000000ff)
--- Additional Comments From doko at debian dot org 2007-04-29 07:10 --- Created an attachment (id=1741) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1741&action=view) assembler file -- http://sourceware.org/bugzilla/show_bug.cgi?id=4436 --- 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 gas/4436] [regression] operand out of range (0x00000000f0000000 is not between 0x0000000000000000 and 0x00000000000000ff)
--- Additional Comments From doko at debian dot org 2007-04-29 07:14 --- binutils 2.17.50.20070420 works. -- http://sourceware.org/bugzilla/show_bug.cgi?id=4436 --- 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