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]

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






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