This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linker Bug or Design Intent (Absolute symbols in zero sized sections)


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.

> 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).

Sure.

> 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
st_shndx?

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]