This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld segfaults on parisc
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Alexander Beregalov <a dot beregalov at gmail dot com>
- Cc: bug-binutils at gnu dot org, binutils at sourceware dot org
- Date: Tue, 17 Mar 2009 17:15:43 +0100
- Subject: Re: ld segfaults on parisc
- References: <a4423d670903170646r78905895h81fb451ffceee70d@mail.gmail.com>
Alexander Beregalov <a.beregalov@gmail.com> writes:
> #0 strlen (str=0xc84 <Address 0xc84 out of bounds>) at strlen.c:64
> #1 0x407b7530 in _IO_vfprintf_internal (s=0xfb1487a0,
> format=0xfb147d80 "arch/parisc/kernel/built-in.o(.text+0x%lx):
> cannot reach %s, recompile with -ffunction-sections", ap=0xfb147d0c)
> at vfprintf.c:1581
> #2 0x407b8284 in buffered_vfprintf (s=0x408bfb98, format=0xfb147da9
> "): cannot reach %s, recompile with -ffunction-sections",
> args=0xfb14a850) at vfprintf.c:2188
> #3 0x407b42e0 in _IO_vfprintf_internal (s=0x408bfb98,
> format=0xfb147d80 "arch/parisc/kernel/built-in.o(.text+0x%lx):
> cannot reach %s, recompile with -ffunction-sections", ap=0xfb147d14)
> at vfprintf.c:1288
> #4 0x40113064 in _bfd_default_error_handler (fmt=0x401ce5a9 "+0x%lx):
> cannot reach %s, recompile with -ffunction-sections")
> at /var/tmp/portage/sys-devel/binutils-2.19.51.0.3/work/binutils-2.19.51.0.3/bfd/bfd.c:698
> #5 0x40153db0 in final_link_relocate (input_section=0x1067b8,
> contents=0x43647008 "cows can fly", rela=0x140bb8,
> value=18446744073709532028, htab=0x8eae8, sym_sec=0x1067b8,
> hh=0x0, info=0x7bf78)
> at /var/tmp/portage/sys-devel/binutils-2.19.51.0.3/work/binutils-2.19.51.0.3/bfd/elf32-hppa.c:3574
Could you please try this patch?
Andreas.
2009-03-17 Andreas Schwab <schwab@linux-m68k.org>
* elf32-hppa.c (final_link_relocate): Cast bfd_vma value to long
for format string.
--- bfd/elf32-hppa.c.~1.165.~ 2009-03-02 20:36:05.000000000 +0100
+++ bfd/elf32-hppa.c 2009-03-17 17:07:26.000000000 +0100
@@ -1,6 +1,6 @@
/* BFD back-end for HP PA-RISC ELF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Original code by
@@ -3411,7 +3411,7 @@ final_link_relocate (asection *input_sec
(_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
input_bfd,
input_section,
- offset,
+ (long) offset,
howto->name,
insn);
}
@@ -3575,7 +3575,7 @@ final_link_relocate (asection *input_sec
(_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
input_bfd,
input_section,
- offset,
+ (long) offset,
hsh->bh_root.string);
bfd_set_error (bfd_error_bad_value);
return bfd_reloc_notsupported;
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."