[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/19446] BFD linker discards section without alloc section a
From: |
xinliangli at gmail dot com |
Subject: |
[Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions |
Date: |
Mon, 11 Jan 2016 23:44:07 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19446
--- Comment #4 from David Li <xinliangli at gmail dot com> ---
(In reply to H.J. Lu from comment #3)
> (In reply to David Li from comment #2)
> > (In reply to H.J. Lu from comment #1)
> > > Since UNREF section is not referenced, it should be GCed. Am I missing
> > > something?
> >
> > Note that the section does not have 'a' bit -- just like debug sections.
> > Linker won't GC debug sections, right?
>
> ld only treats known debug sections as debug sections. Are you looking
> for a way to prevent unreferenced section from GC?
yes.
>
> > Also there is inconsistent behavior here -- when g0 is not referenced by
> > UNREF, UNREF will be kept by the linker.
>
> g0 is removed by ld in binutils 2.26.
No -- that is not the point. The point is that if UNDEF section is defined as
follows, ld *will* keep UNREF (I have not tried 2.26). What makes ld think
UNREF should be kept here as they are not known debug sections?
.globl unref
.section UNREF,"",@progbits
.align 8
.type unref, @object
.size unref, 8
unref:
.long 0
.text
.globl main
.type main, @function
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/19446] New: BFD linker discards section without alloc section attribute under certain conditions, xinliangli at gmail dot com, 2016/01/11
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, xinliangli at gmail dot com, 2016/01/11
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, hjl.tools at gmail dot com, 2016/01/11
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, xinliangli at gmail dot com, 2016/01/11
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, hjl.tools at gmail dot com, 2016/01/11
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions,
xinliangli at gmail dot com <=
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, hjl.tools at gmail dot com, 2016/01/11
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, xinliangli at gmail dot com, 2016/01/12
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, hjl.tools at gmail dot com, 2016/01/12
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, nickc at redhat dot com, 2016/01/21
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, xinliangli at gmail dot com, 2016/01/21
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, nickc at redhat dot com, 2016/01/22
- [Bug binutils/19446] BFD linker discards section without alloc section attribute under certain conditions, xinliangli at gmail dot com, 2016/01/22