This is the mail archive of the binutils@sources.redhat.com 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: .rela.data


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.


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