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: Adding new section to program headers


On Wed, Sep 16, 2009 at 11:31:28AM +0300, Bahadir Balban wrote:
> I have created custom sections in my linker script such as .img.0 .img.1  
> and so on.
>
> These are loadable sections, but since they are non-standard, they don't  
> seem to make it to program header table like the standard .data .text  
> sections.

I think you'll find they are covered in the headers, but not in
separate headers as you seem to want.

> I see in ld manual that I can define program headers with the PHDRS  
> directive. However, if I define that, I need to re-define standard  
> sections in it as well.
>
> Is there a shorter way to just mark those custom sections in the script  
> so that they make it to program header table?

No, not unless you are willing to write some linker code.

-- 
Alan Modra
Australia Development Lab, IBM


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