This is the mail archive of the
mailing list for the binutils project.
Re: Linker Bug or Design Intent (Absolute symbols in zero sized sections)
On Thu, Oct 12, 2006 at 10:34:09AM -0400, Jakub Jelinek wrote:
> On Thu, Oct 12, 2006 at 01:13:41PM +0930, Alan Modra wrote:
> > > Against emitting empty sections speaks both that it is a wasted space
> > > in section header table/.shstrtab, but more importantly that empty
> > > sections are an endless source of bugs
> > Agreed.
> > If we are to remove them, then
> > a) Detecting a symbol assignment in a linker script should result in the
> > section alignment and vma being honoured.
> Not sure what are we doing ATM here.
The wrong thing..
> > b) All the ELF backends will need changes so that removed output section
> > syms are never used when emitting relocs. At the same time, we may
> > as well just use one section sym for all relocs (or two for targets
> > that might want to relocate the data segment separately from the text
> > segment).
> > c) _bfd_fix_excluded_sec_syms should be changed to not create absolute
> > syms.
> And instead have the nearest section in the same loadable segment in
Something like that. I figured on just using the closest preceding
section. BTW, I started throwing a patch together to do (b).
IBM OzLabs - Linux Technology Centre