This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: .rela.data
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at codito dot com>
- To: Senthil Prakash <prakasse at india dot hp dot com>, binutils at sources dot redhat dot com
- Date: Fri, 09 Apr 2004 15:12:08 +0530
- Subject: Re: .rela.data
- References: <000401c41e14$c31a5ac0$51624c0f@eb9881>
Senthil Prakash wrote:
Hi,
I am new to this group.
I want to know when .rela.dat section will be created.
.rela.data would be created when you have a reference to a data
member within the data section . I don't have a system currently
to create a .rela.data but I am sure this would be the same else
where .This is what is available on the i386 because the i386
does not need RELA relocations .
The entry you see is actually a relocation entry that describes
the behaviour given below.
int a;
int *b = &a;
void main(void)
{
}
[ramana@numenor tmp]$ readelf -r try1.o
Relocation section '.rel.data' at offset 0x3d0 contains 1 entries:
Offset Info Type Sym.Value Sym. Name
00000000 00000901 R_386_32 00000004 a
For more basics, I would suggest that you read the excellent book
by John Levine called Linkers and Loaders.
HTH
cheers
ramana
Will be helpful if a test case is provided.
Senthil.