* Your elf-bfd.h and elflink.c changes caused ld regressions for cris-axis-elf (likely others)
@ 2005-03-18 17:32 Hans-Peter Nilsson
2005-03-18 18:01 ` H. J. Lu
0 siblings, 1 reply; 4+ messages in thread
From: Hans-Peter Nilsson @ 2005-03-18 17:32 UTC (permalink / raw)
To: binutils
(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:
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-checks/checks.exp ...
FAIL: check sections 1
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-cris/cris.exp ...
FAIL: ld-cris/def3
FAIL: ld-cris/ldsym1
FAIL: ld-cris/noglob1
FAIL: ld-cris/obj1
FAIL: ld-cris/obj2
FAIL: ld-cris/undef3
FAIL: ld-cris/v10-va
FAIL: ld-cris/v32-ba-1
FAIL: ld-cris/v32-va
FAIL: ld-cris/va-v10
FAIL: ld-cris/va-v32
FAIL: ld-cris/warn2
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-crx/crx.exp ...
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-cygwin/exe-export.exp ...
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-d10v/d10v.exp ...
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-discard/discard.exp ...
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf/elf.exp ...
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf/exclude.exp ...
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf/frame.exp ...
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf/sec64k.exp ...
FAIL: ld-elf/64ksec
All errors look like:
/n/asic_slask/hp/autobinutest/ld/ld-new: tmpdir/asm.x: could not find output section .ctors for input section .ctors
/n/asic_slask/hp/autobinutest/ld/ld-new: final link failed: Nonrepresentable section on output
FAIL: check sections 1
brgds, H-P
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Your elf-bfd.h and elflink.c changes caused ld regressions for cris-axis-elf (likely others)
2005-03-18 17:32 Your elf-bfd.h and elflink.c changes caused ld regressions for cris-axis-elf (likely others) Hans-Peter Nilsson
@ 2005-03-18 18:01 ` H. J. Lu
2005-03-19 0:18 ` Alan Modra
0 siblings, 1 reply; 4+ messages in thread
From: H. J. Lu @ 2005-03-18 18:01 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: binutils
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;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Your elf-bfd.h and elflink.c changes caused ld regressions for cris-axis-elf (likely others)
2005-03-18 18:01 ` H. J. Lu
@ 2005-03-19 0:18 ` Alan Modra
2005-03-19 1:05 ` H. J. Lu
0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2005-03-19 0:18 UTC (permalink / raw)
To: H. J. Lu; +Cc: Hans-Peter Nilsson, binutils
On Fri, Mar 18, 2005 at 07:37:23AM -0800, H. J. Lu wrote:
> 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:
Huh. What cris weirdness is this exposing? Symbols defined in output
sections?
Looks.. Oh, OK, the symbols defined in output sections are some
provided by the linker script. I guess it's not cris weirdness after
all. ;-)
> 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;
> }
You may as well leave off the !bfd_is_const_section test, or revert to
as you had it. At one stage bdf_abs_section was const, so attempting to
change flags would cause segfaults. I overreacted to think it incorrect
to twiddle bfd_abs_section. It doesn't really matter to just set
SEC_KEEP.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Your elf-bfd.h and elflink.c changes caused ld regressions for cris-axis-elf (likely others)
2005-03-19 0:18 ` Alan Modra
@ 2005-03-19 1:05 ` H. J. Lu
0 siblings, 0 replies; 4+ messages in thread
From: H. J. Lu @ 2005-03-19 1:05 UTC (permalink / raw)
To: Hans-Peter Nilsson, binutils
On Sat, Mar 19, 2005 at 10:06:59AM +1030, Alan Modra wrote:
> > --- 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;
> > }
>
> You may as well leave off the !bfd_is_const_section test, or revert to
> as you had it. At one stage bdf_abs_section was const, so attempting to
> change flags would cause segfaults. I overreacted to think it incorrect
> to twiddle bfd_abs_section. It doesn't really matter to just set
> SEC_KEEP.
>
I reverted it to the old version.
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-03-18 23:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-18 17:32 Your elf-bfd.h and elflink.c changes caused ld regressions for cris-axis-elf (likely others) Hans-Peter Nilsson
2005-03-18 18:01 ` H. J. Lu
2005-03-19 0:18 ` Alan Modra
2005-03-19 1:05 ` H. J. Lu
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).