This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Linker Bug or Design Intent (Absolute symbols in zero sized sections)
On Tue, Sep 26, 2006 at 12:54:46PM -0400, Vivek Goyal wrote:
> H. J. Lu wrote:
> >On Tue, Sep 26, 2006 at 10:58:10AM -0400, Daniel Jacobowitz wrote:
> >
> >>On Tue, Sep 26, 2006 at 07:51:59AM -0700, H. J. Lu wrote:
> >>
> >>>I think for --emit-relocs, we can keep an empty output section if its
> >>>address is taken.
> >>>
> >>>Of course, we need to update linker doc.
> >>
> >>I think we're being too specific to this case.
> >>
> >>Why are we changing what the linker script clearly defines as section
> >>relative symbols to absolute symbols? This isn't the only use case
> >>I've encountered where that will break. We should either discard the
> >
> >
> >Please open a bug report with a testcase for each different issue.
> >
>
> Opened a bug numbered 3267 for this issue at http://sourceware.org/bugzilla
It looks like we shouldn't convert section relative symbols in linker
script to absolute symbol. We still need to do decide if/how we should
remove an empty section which doesn't have a symbol relative to it.
1. If the empty section doesn't set VMA, removing it doesn't change
the next section VMA.
2. If its VMA is set to a constant, removing it will change the next
section VMA.
3. If its VMA is set to an expression, removing it may change the next
section VMA.
I'd like to totally remove the empty section and set the next section
VMA to "dot" for #1 and #3. For #2, we remove the empty section and
set to the next section VMA to the constant VMA of the removed empty
section.
H.J.