[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Task 41747: new ELF special sections

On Fri, Nov 16, 2001 at 01:25:01PM -0500, Matt Wilson wrote:
> On Thu, Nov 15, 2001 at 09:28:54AM -0600, George Kraft IV wrote:
> > The LSB has identified the following new ELF special sections
> > 
> > .rodata.str1.1
> > .rodata.str1.32
> > .rodata.cst8
> These are generated when gcc uses constant merging.

Though if you want to list them somewhere, .rodata.* might be more
It is actually .rodata.strM.N where M is size of character in the string
and N is alignment in bytes, so e.g. for L"abc" it might as well be
.rodata.cstN is for fixed size readonly constants N bytes in size (and
aligned to the same size).
BTW: more and more such sections will be added as times goes, but must of
them are in relocatable objects only. Shouldn't LSB just speak about
sections present in ET_EXEC/ET_DYN objects?
E.g. there will probably be .data.rel, .data.rel.ro and .data.rel.ro.local
sections soon.

> > .rel.dyn
> Well, this is from digital unix, section 9.3.5 of the Assembly
> Language Programmer's Guide:
> The dynamic relocation section describes all locations within the
> object that must be adjusted if the object is loaded at an address
> other than its linked base address.

This might be worth mentioning perhaps (but note that there is .rela.dyn on
most arches). This is basically .rel.bss, .rel.data, .rel.text and all other
SHF_ALLOC .rel.* sections but .rel.plt. The reason all of them are in one
section is that the relocs can be sorted to allow symbol lookup caching in
the dynamic linker (see -z combreloc linker option).


Reply to: