This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Adding new section to program headers
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Bahadir Balban <bahadir at l4dev dot org>
- Cc: binutils at sourceware dot org
- Date: Thu, 17 Sep 2009 16:37:45 +0930
- Subject: Re: Adding new section to program headers
- References: <4AB0A260.1000308@l4dev.org>
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