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]

Re: gold patch committed (Was: Re: Help needed to track down bug: linking Linux kernel with gold creates unbootable kernel)


On 04/23/2010 08:30 AM, H.J. Lu wrote:
You can't load the first segment with 0x1000 alignment. You
need to load the first segment with the alignment of the second
segment. Why does gold have to make life harder for loader?

Each PT_LOAD is a *segment* with separate attributes. There is no guarantee that a single read() or mmap() can necessarily handle more than one PT_LOAD at a time, although it does work in many cases. Both execve() and dlopen() iterate over ElfXX_Phdr, processing each PT_LOAD separately. A boot loader must do likewise. For instance ELF makes no guarantee that the PT_LOAD are in ascending order by .p_vaddr or .p_paddr.

--


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