* Re: ld segfaults on parisc
[not found] <a4423d670903170646r78905895h81fb451ffceee70d@mail.gmail.com>
@ 2009-03-17 16:16 ` Andreas Schwab
2009-03-18 11:09 ` Alexander Beregalov
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2009-03-17 16:16 UTC (permalink / raw)
To: Alexander Beregalov; +Cc: bug-binutils, binutils
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."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ld segfaults on parisc
2009-03-17 16:16 ` ld segfaults on parisc Andreas Schwab
@ 2009-03-18 11:09 ` Alexander Beregalov
2009-03-19 10:41 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Beregalov @ 2009-03-18 11:09 UTC (permalink / raw)
To: Andreas Schwab; +Cc: bug-binutils, binutils
2009/3/17 Andreas Schwab <schwab@linux-m68k.org>:
> 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.
>
It works, thanks!
LD .tmp_vmlinux1
ld: arch/parisc/kernel/built-in.o(.text+0xc84): cannot reach
000000b2_b2:46+4068, recompile with -ffunction-sections
ld: arch/parisc/kernel/built-in.o(.text+0xc84): cannot handle
R_PARISC_PCREL12F for .text
ld: final link failed: Bad value
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ld segfaults on parisc
2009-03-18 11:09 ` Alexander Beregalov
@ 2009-03-19 10:41 ` Andreas Schwab
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2009-03-19 10:41 UTC (permalink / raw)
To: Alexander Beregalov; +Cc: bug-binutils, binutils
Alexander Beregalov <a.beregalov@gmail.com> writes:
> 2009/3/17 Andreas Schwab <schwab@linux-m68k.org>:
>> 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.
>>
> It works, thanks!
Thanks for testing.
I have now checked this in as obvious.
Andreas.
--
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."
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-19 10:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <a4423d670903170646r78905895h81fb451ffceee70d@mail.gmail.com>
2009-03-17 16:16 ` ld segfaults on parisc Andreas Schwab
2009-03-18 11:09 ` Alexander Beregalov
2009-03-19 10:41 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).