This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Regarding linker code generation
- From: "Bhushan Verma" <bhushan dot verma at iap-online dot com>
- To: <binutils at sourceware dot org>
- Date: Mon, 30 Jul 2007 12:30:01 +0900
- Subject: Regarding linker code generation
Dear ALL,
Could you please help me to sort out my problem.
Actually whenever I run my run time linker on unix like OS (arm) with
following Program header
This run well.
Program Header[0]:
p_vaddr: 0 p_flags: [ PF_X PF_W PF_R ]
p_paddr: 0 p_type: [ PT_LOAD ]
p_filesz: 0x2bc1f p_memsz: 0x2d6c8
p_offset: 0 p_align: 0x8000
Why linker is generating this type of header?
But whenwver I separate code and data segment this gives segmentation fault
inside self relocation of run time linker.
after separation of code and data segment of run timer linker:
Program Header[0]:
p_vaddr: 0 p_flags: [ PF_X PF_R ]
p_paddr: 0 p_type: [ PT_LOAD ]
p_filesz: 0x2b094 p_memsz: 0x2b094
p_offset: 0 p_align: 0x8000
Program Header[1]:
p_vaddr: 0x330a4 p_flags: [ PF_W PF_R ]
p_paddr: 0x330a4 p_type: [ PT_LOAD ]
p_filesz: 0xa2b p_memsz: 0x24d4
p_offset: 0x2b0a4 p_align: 0x8000
I am using gnu arm toolchain
Could you please help me is this due to permiison of data segment or I have
some other problem as in creating wrong data segment etc.
could you please explian me p_vaddr Vs p_paddr.
Regards
Verma