This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Your elf-bfd.h and elflink.c changes caused ld regressions for cris-axis-elf (likely others)
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 18 Mar 2005 07:37:23 -0800
- Subject: Re: Your elf-bfd.h and elflink.c changes caused ld regressions for cris-axis-elf (likely others)
- References: <200503181508.j2IF8Se4032085@ignucius.se.axis.com>
On Fri, Mar 18, 2005 at 04:08:28PM +0100, Hans-Peter Nilsson wrote:
> (Forgot to CC the list. I'm not *that* polite. :-)
>
> Apparently (because it's the only change) this change:
>
> 2005-03-18 Alan Modra <amodra@bigpond.net.au>
>
> * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
> * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
> section_sym_count param, and return number of section symbols.
> (bfd_elf_size_dynamic_sections): Clear section symbol area of
> .dynsym contents. Don't bother calling swap_symbol_out on the
> first all-zero dynsym.
> (elf_mark_used_section): Formatting. Avoid twiddling flags in
> special sections like bfd_abs_section.
> (bfd_elf_gc_sections): Spelling fix.
>
> caused these failures for cris-axis-elf:
>
I will check it in shortly.
H.J.
----
--- bfd/elflink.c.zero 2005-03-18 06:23:37.000000000 -0800
+++ bfd/elflink.c 2005-03-18 06:55:10.322391518 -0800
@@ -9012,7 +9012,9 @@ elf_mark_used_section (struct elf_link_h
|| h->root.type == bfd_link_hash_defweak)
{
asection *s = h->root.u.def.section;
- if (s != NULL && s->output_section != NULL && s->output_section != s)
+ if (s != NULL
+ && s->output_section != NULL
+ && !bfd_is_const_section (s->output_section))
s->output_section->flags |= SEC_KEEP;
}