[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with binutils-2.14 on sparc-sun-solaris
From: |
Michael van Elst |
Subject: |
Re: problems with binutils-2.14 on sparc-sun-solaris |
Date: |
Thu, 19 Jun 2003 12:44:31 +0200 |
User-agent: |
Mutt/1.4i |
On Thu, Jun 19, 2003, Alan Modra wrote:
> On Thu, Jun 19, 2003 at 10:04:02AM +0200, Michael van Elst wrote:
> > I will try to reapply your patches to the binutils-2.14 sources.
>
> I doubt that will work as there were some later changes.
Yet it does. gcc now builds successfully.
> It would be
> more useful to work on finding a small testcase to reproduce the problem.
I fear I'm not familiar with the inner workings of the binutils linker
to come up with a test case. What is an eh-frame and when is it used
in sparc code ?
Here is the patch that I did apply:
--- bfd/elflink.h.dist 2003-06-19 09:57:30.000000000 +0200
+++ bfd/elflink.h 2003-06-19 10:02:26.000000000 +0200
@@ -8692,7 +8692,10 @@
if (_bfd_elf_discard_section_eh_frame (abfd, info, eh,
elf_reloc_symbol_deleted_p,
&cookie))
+ {
ret = TRUE;
+ elf_section_data (eh)->relocs = cookie.rels;
+ }
if (cookie.rels != NULL
&& elf_section_data (eh)->relocs != cookie.rels)
--- bfd/elf-eh-frame.c.dist 2003-06-19 09:57:34.000000000 +0200
+++ bfd/elf-eh-frame.c 2003-06-19 10:01:22.000000000 +0200
@@ -254,6 +254,7 @@
unsigned int make_relative, make_lsda_relative;
bfd_size_type new_size;
unsigned int ptr_size;
+ Elf_Internal_Rela *rel;
if (sec->_raw_size == 0)
{
@@ -577,7 +578,8 @@
goto free_no_table;
ENSURE_NO_RELOCS (buf);
- if (GET_RELOC (buf) == NULL)
+ rel = GET_RELOC (buf);
+ if (rel == NULL)
/* This should not happen. */
goto free_no_table;
if ((*reloc_symbol_deleted_p) (buf - ehbuf, cookie))
@@ -586,6 +588,7 @@
be deleted. */
new_size -= hdr.length + 4;
sec_info->entry[sec_info->count].removed = 1;
+ memset (rel, 0, sizeof(*rel));
}
else
{
Greetings,
--
,eM""=. a"-. Michael van Elst
dWWMWM" - :GM==; address@hidden
:WWMWMw=--. "W=' cable & wireless
9WWMm==-.
"-Wmw-" CABLE & WIRELESS