GAS ARC Elf32 segfaults.
Ramana Radhakrishnan
ramana.radhakrishnan@codito.com
Wed Sep 8 08:38:00 GMT 2004
Hi,
GAS Segfaults in bfd_install_relocation while attempting to fix the
symbols relocation types . It finds that the symbol pointer is none.
AFAIK the local symbols seem to be indicated by having a NULL pointer.
This error originally came while building newlib for the ARC and the
problem was while assembling dtoa.s . I also took an equivalent case for
the i386 and have printed the results below.
What struck me as slightly uncommon was the fact that for the i386 the
reloc entry shows .LC3 as *UND* and the ARC backend shows it to be
defined in the correct section. Am I on the right track or is this some
other problem ?
Info
----
GNU assembler version 2.15.91 (arc-elf32) using BFD version 2.15.91 20040907
[ramana@numenor gas]$ cat failarc.s
.section .rodata.str, "aMS", @progbits, 1
.LC3: .string "main"
.section .text
mov r0, .LC3+1
[ramana@numenor gas]$ cat inteltest.s
.section .rodata.str1.4, "aMS",@progbits, 1
LC3: .string "main"
.section .text
main:
.globl main
mov .LC3+1,%eax
Debug output For ARC
---------------------
sec .text relocs:
080f18c0: type 2 sym 80cb8e8 .LC3 resolved local .rodata.str 0
adjusting fixup:
fix 80f18c0 fail.s:4
size=4 frag=80e3760 where=4 offset=1 addnumber=0
BFD_RELOC_32 (2)
+<sym 80cb8e8 .LC3 resolved local .rodata.str 0>
sec .text relocs:
080f18c0: type 2 sym 80cb8e8 .LC3 resolved local .rodata.str 0
processing fixup:
fix 80f18c0 fail.s:4
size=4 frag=80e3760 where=4 offset=1 addnumber=0
BFD_RELOC_32 (2)
+<sym 80cb8e8 .LC3 resolved local .rodata.str 0>
result:
fix 80f18c0 fail.s:4
size=4 frag=80e3760 where=4 offset=1 addnumber=0
BFD_RELOC_32 (2)
+<sym 80cb8e8 .LC3 frag 0 resolved used-in-reloc used local defined
.rodata.str 0>
Segmentation fault
Debug output for i386
---------------------
For i386
adjusting fixup:
fix 80f4974 fail.s:6
size=4 frag=810c760 where=1 offset=1 addnumber=0
BFD_RELOC_32 (2)
+<sym 80f4960 .LC3 resolved local *UND*>
processing fixup:
fix 80f4974 fail.s:6
size=4 frag=810c760 where=1 offset=1 addnumber=0
BFD_RELOC_32 (2)
+<sym 80f4960 .LC3 resolved local *UND*>
result:
fix 80f4974 fail.s:6
size=4 frag=810c760 where=1 offset=1 addnumber=0
BFD_RELOC_32 (2)
+<sym 80f4960 .LC3 frag 0 resolved used-in-reloc used local *UND*>
cheers
Ramana
More information about the Binutils
mailing list